Jquery 历史记录/后退按钮插件的当前状态?

发布于 2024-10-29 05:36:30 字数 454 浏览 5 评论 0原文

大约一年前我花了很长时间研究这个问题 我尝试过:

我发现 jquery.address 插件是最好的,但这些东西变化很快。

最近有没有人彻底研究过这个选项?在再次集成 jquery.address 之前,渴望听到一些想法(我之前没有遇到任何问题)

I spent a long time looking into this about a year ago,
I tried:

I found the jquery.address plugin to be the best, but these things change quickly.

Has anyone thoroughly researched the options for this RECENTLY? Keen to hear some thoughts before I integrate jquery.address again (I didn't have any issues with it before)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蛮可爱 2024-11-05 05:36:30

我是 History.js 的作者,正如 SnippetSpace 在他的回答中所说,它与 < a href="https://developer.mozilla.org/en/DOM/Manipulated_the_browser_history" rel="nofollow noreferrer">HTML5 History API,带有针对旧版浏览器的可选哈希回退。 HTML5 History API 允许您直接修改 url,因此不再需要哈希!耶!

有关后退/前进插件当前情况的列表,您可以在此处查看:
https://github.com/Modernizr/Modernizr/wiki/HTML5-跨浏览器-Polyfills

由于 HTML5 History API 是一个 后退/前进/散列/hashbang 问题的正确解决方案,与旧的 hashchange 解决方案相比,这确实是可行的方法。哈希的问题包括:访问哈希 url 时的双重加载、不同的 url、与禁用 js 的用户共享哈希链接不起作用。

还有另一个支持 HTML5 History API 的插件,它是 jQuery Address,但它确实支持不支持像replaceState这样的东西,我不确定它是否真的支持HTML5 History API的跨浏览器。但是看看它的问题列表我想说的是它的支持并不是这样出色地。

I am the author of History.js which as SnippetSpace has said in his answer works with the HTML5 History API with an optional hash-fallback for older browsers. The HTML5 History API allows you to modify the url directly, so no need for hashes anymore! Yay!

For a listing of the current situation of back/forward plugins you can check here:
https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills

As the HTML5 History API is a proper solution to the back/forward/hash/hashbang problem, it's really the way to go compared to the old hashchange solutions. Problems with hashes include: double load when accessing a hashed url, different urls, sharing hashed links with js-disabled users don't work.

There is one other plugin which supports the HTML5 History API which is jQuery Address, however it does not support things like replaceState and I'm unsure of it's actual cross-browser support for the HTML5 History API. But looking at it's list of issues I'm saying that it's support isn't that well.

忆伤 2024-11-05 05:36:30

我对此进行了研究并进行了研究,确实这三个是最好的。我喜欢history.js,因为它支持html5历史管理,可以更改URL而不是添加哈希值:)。至少作者是这么告诉我的。

I've looked trough this and have researched them and indeed those 3 are the best. I like history.js because it supports html5 history management that changes the URL instead of adding hashes :). At least that's what the author told me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文