最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Current state of Jquery historyback-button plugins? - Stack Overflow

programmeradmin5浏览0评论

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

  • Jquery BBQ plugin
  • Jquery History plugin
  • jquery .address plugin

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)

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

  • Jquery BBQ plugin
  • Jquery History plugin
  • jquery .address plugin

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)

Share Improve this question asked Apr 1, 2011 at 12:04 HaroldoHaroldo 37.4k47 gold badges131 silver badges169 bronze badges 6
  • "best"? In what way? What functionality/features are you after? – Richard H Commented Apr 1, 2011 at 12:07
  • None of them make use of the new HTML5 History interface supported in the recent Chromes and Firefox 4. – Andy E Commented Apr 1, 2011 at 12:09
  • @Andy - i think jquery bbq does? – Haroldo Commented Apr 1, 2011 at 12:33
  • @Richard - not totally sure. I remember getting frustrated with jqyery.history. Just keen to get someone's experience of a plugin they thought was brilliant. – Haroldo Commented Apr 1, 2011 at 12:34
  • @Haroldo: BBQ only uses the hash/hashchange features of HTML 5. It doesn't appear to make use of pushState or replaceState. – Andy E Commented Apr 1, 2011 at 13:00
 |  Show 1 more ment

2 Answers 2

Reset to default 8

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./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 pared 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.

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.

发布评论

评论列表(0)

  1. 暂无评论