We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Magix第1个版本做了hash与pushState之间的切换兼容 关于url解析可以看这篇
当时在做history.pushState时(2012年),发现对于onpopstate对于不同的浏览器是不一样的。
$(window).on("popstate", function() { alert('popstate'); });
上述代码在chrome中页面加载完成时竟然会弹出 popstate。 现在仍然能够搜出很多在stackoverflow问这个问题的人,如 http://stackoverflow.com/questions/4688164/window-bind-popstate http://stackoverflow.com/questions/6421769/popstate-on-pages-load-in-chrome/
popstate
当时阅读了pjax,使用了类似如下的解决方案
var initialURL = location.href,popped $(window).bind('popstate', function(event) { var initialPop = !popped && location.href == initialURL popped = true if ( initialPop ) return
当然,现在并没有这样的问题了
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Magix第1个版本做了hash与pushState之间的切换兼容
关于url解析可以看这篇
当时在做history.pushState时(2012年),发现对于onpopstate对于不同的浏览器是不一样的。
上述代码在chrome中页面加载完成时竟然会弹出
popstate
。现在仍然能够搜出很多在stackoverflow问这个问题的人,如
http://stackoverflow.com/questions/4688164/window-bind-popstate
http://stackoverflow.com/questions/6421769/popstate-on-pages-load-in-chrome/
当时阅读了pjax,使用了类似如下的解决方案
当然,现在并没有这样的问题了
The text was updated successfully, but these errors were encountered: