@ sign as url parameter separator?

北城以北 提交于 2019-12-02 07:16:02

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!