history.js plugin - how to use

。_饼干妹妹 提交于 2019-12-01 00:57:31

To answer your questions: 1) Yes, you need to tie in history.js with your code. History.js will remember any parameters you pass to it, etc, but of course it's up to you to do something with those parameters.

2) Would need to see what you're referring to. My implementation doesn't "flash" the page, but then again, I'm not using the "title" functionality of history.js. See point #4 below for related info. I would bet your implementation is loading the page twice, each time you go back/forward.

3) I use IE9 and don't get any such alert. Provide more information about what it says. If it's an error message, then most likely you have a Javascript error in your code.

4) The suid param appears in non-HTML5 browsers (like IE9) when you use the data & title params of History.pushState(data, title, url). My implementation of history.js only uses the url param, therefore I do History.pushState(null, null, url) and the suid doesn't appear in IE9.

NavaRajan

3.IE (I'm using verison 9) shows a popup box on each page change saying 'message from the website' - kind of like an error - can I sort this somehow?

Reason: You need to remove 'History.log()' from the code... In IE this History.log is writing the log output in alertbox...

Adam

history.js plugin doesn't work very well... its a good idea and I would still give the author credit for his attempts but almost none of the cased sites use it:

https://github.com/browserstate/history.js/wiki/Showcase

and the HTML4 support just gives me IE errors.

My advise if you looking for a solution like this is to write you own solution to suit the site you building...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!