gpt4 book ai didi

javascript - 为什么在 url 中使用 'at' (@) 符号而不是 'hash' (#)

转载 作者:搜寻专家 更新时间:2023-10-31 22:20:30 24 4
gpt4 key购买 nike

Google map 正在使用“at”@(不是 %40)而不是没有“hash”的 # 来更改 url页面重新加载。所有最新的浏览器都支持它。我以前没见过这个,也找不到关于这个主题的任何信息(可能是因为“at”是一个常用词)。

  1. 浏览器对`@ 符号的支持是什么?

  2. 为什么使用 @ 而不是 #

  3. 是否有像 window.location.hash 这样的默认 Javascript/JQuery 函数?

示例:

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

当您在 map 周围移动时,url 将发生变化而无需重新加载。

最佳答案

  1. 没关系
  2. 所以它被发送到服务器
  3. 没有

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

他们使用 pushState and friends . @ 在这里没有特别的意义(除了谷歌在他们的服务器上赋予它的意义)。

关于javascript - 为什么在 url 中使用 'at' (@) 符号而不是 'hash' (#),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25381446/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com