简体   繁体   中英

History API doesn't work (Back/Forward)

In the link below, I made ​​an history.pushState example.

But if you click on the links and then try to go back or forward, you will see that don't works. You know tell me why? There are good practices? Can you help me?

http://jsfiddle.net/BQPgh/

不是您特定问题的解决方案,但我认为值得一提:有一个非常流行的jQuery / Prototype / Mootools插件,可以很好地包装HTML5历史API: https : //github.com/browserstate/History.js/

Also do check out bbq plugin. http://benalman.com/projects/jquery-bbq-plugin/

It's because the back and forward don't work with ajax.

You might try storing the previous page loaded somewhere and then have the back and forward links load your own history handler.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM