问题
While browsing the new Google Maps I saw that they are using an @
sign instead of ?
to seperate the url-path from the query parameters, like:
https://www.google.com/maps/@38.1158476,-96.2044115,6z
The coordinates after the @
change as you are navigating around the map, but without a browser refresh. Bookmarking works fine with this.
Wikipedia does not mention anything about this, RFC3986 only shows the @
sign as a possibility for username/password authentication.
Is this a standardised feature or a proprietary browser functionality? Is this feature safe to use, and how do I use it correctly?
回答1:
@38.1158476,-96.2044115,6z
is not the query component. It’s still part of the path component.
The @ character can be used in the path, even without percent-encoding it.
So from the URI standard perspective, there is nothing special about this URI. There could have been used any other (or no) character instead.
I assume Google uses the @
here because users might read it as "at", which is suitable for "at <location>".
来源:https://stackoverflow.com/questions/22221252/sign-as-url-parameter-separator