通过Ajax更改页面内容时保持浏览器历史记录 [英] Maintaining Browser History when changing page content via Ajax
问题描述
正如标题我想保持当我通过Ajax更改页面浏览器历史记录。
As the title suggests I want to maintain browser history when I am changing the page via Ajax.
现在,每一页都有一个相应的动作和/或URL参数,这样就可以通过URL直接导航到每一页,但因为我使用Ajax浏览器的历史记录和URL更改页面确实发生了改变。
Now, each page has a corresponding action and/or URL Parameter so it is possible to navigate directly to each page via the URL but because I am changing the page using Ajax the browser's history and URL does change.
想想谷歌即时的。你不改变搜索,但浏览器的前进/后退的功能之间页被保持。任何想法如何做到这一点(jQuery方法特别有用)
Think of Google Instant. Your not changing page between searches but the back/forward functionality of the browser is maintained. Any ideas how to do this (jQuery methods especially useful)
推荐答案
试一下: http://ajaxpatterns.org/Unique_URLs
这篇关于通过Ajax更改页面内容时保持浏览器历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!