3

Google maps is changing the url with an 'at' @ (not %40) instead of the 'hash' # without a page reload. All the newest browsers are supporting it. I haven't see this before and I couldn't find any information on this topic (probably because 'at' is a common word).

  1. What is the browser support for the `@ sign?

  2. Why use an @ instead of #?

  3. Is there a default Javascript/JQuery function like window.location.hash?

Example:

https://www.google.nl/maps/@52.4989114,5.2799319,11z

When you move the map around the url will changes without a reload.

Bojangles
  • 99,427
  • 50
  • 170
  • 208
Benexx
  • 129
  • 1
  • 8
  • @ unlike # is part of url which the server receives (# in purely client-side). – Cthulhu Aug 19 '14 at 10:49
  • 7
    So is the hash officially called a hashtag now? Nobody seems to call it a hash anymore. – BoltClock Aug 19 '14 at 10:49
  • 1
    Changing the url "without reloading" is called a "push". You have access to the API through `window.history.pushState()`. I guess `@` is just a prefix Google uses for long/lat detection for reason mentioned by @Cthulhu. – Daniel Aug 19 '14 at 10:49
  • That has nothing to do with HTTP protocol in this case. I guess @ `is included as a variable. And then they check if a variable contains `@` then respond via JSON, otherwise send a content of some page – Yang Aug 19 '14 at 10:50
  • 1
    Related: http://stackoverflow.com/questions/19509028/at-symbol-inside-urls – James Donnelly Aug 19 '14 at 10:50
  • 2
    A hashtag is a means of indicating that a term should be hyperlinked to a search engine on social media networks. It gets the name because it it uses a hash character to prefix it. Please don’t confuse other uses of the hash character with hashtags. – Quentin Aug 19 '14 at 10:50
  • In my mind `#` mostly resembles a [tic-tac-toe](http://en.wikipedia.org/wiki/Tic-tac-toe) grid. It's a shame we don't call them tic-tac-toe-tags. – James Donnelly Aug 19 '14 at 10:52
  • The whimsical Google engineers likely just use "@" as a notation for *"at location ..."*, which is exactly what that parameter is. It means nothing special beyond that to browsers. – deceze Aug 19 '14 at 10:53
  • @deceze: Google, what are you doing? "@" clearly means "at a person", everyone knows that! – BoltClock Aug 19 '14 at 10:54
  • Let's meet @BoltClock later! – deceze Aug 19 '14 at 10:55
  • 1
    @BoltClock I'm just glad, people stopped calling it 'pound'. – musaul Aug 19 '14 at 10:55
  • And let's #BoltClock later too. @musaul – deceze Aug 19 '14 at 10:55

2 Answers2

7
  1. It's fine
  2. So it gets sent to the server
  3. No

When you move the map around the url will changes without a reload.

They use pushState and friends. The @ has no special significance (beyond what Google gives it on their servers) here.

Community
  • 1
  • 1
Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
1

They use HTML5 session history and navigation API.

With pushState you can set the URL without refresh the page.

You can see examples: https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history

SnakeDrak
  • 3,406
  • 4
  • 28
  • 41