Hash(#) 在 URL 中的使用 [英] Usage of Hash(#) in URL

查看:32
本文介绍了Hash(#) 在 URL 中的使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道除了作为 URL 中的锚点之外,是否还有其他用途的哈希.我在这里读到了它获取完整的 url,包括哈希后的查询字符串 .客户端的状态信息是什么?请帮忙.

I was wondering is there any use of hash other than as an anchor in URL. I read about it here getting the full url including query string after hash . What is state information for the client? Please help.

推荐答案

散列也可用于单页应用程序,因此不是使用它来导航到页面中的某个点,而是使用散列作为导航的手段从一页到另一页.这样做的好处是不需要刷新页面.

The hash can be used also for single page applications, so instead of using it to navigate to a point in a page you use the hash as a means for navigated from page to page. The advantage of this is that it does not require a page refresh.

还有一种叫做 hashbanging 的方法,用于单页应用程序,用于帮助 ajax 应用程序更可索引.

There is also a method called hashbanging which is used for single page applications and is used for helping ajax applications more indexible.

有几篇关于这个主题的好文章

There are a few good articles on the subject

这篇关于Hash(#) 在 URL 中的使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆