Damien
Damien

Reputation: 14057

Maintaining Browser History when changing page content via Ajax

As the title suggests I want to maintain browser history when I am changing the page via Ajax.

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.

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)

Upvotes: 3

Views: 6354

Answers (2)

pixelistik
pixelistik

Reputation: 7830

HTML5 introduces the pushState() function that allows for a manipulation of the browser history entries. For jQuery, there is jQuery BBQ: Back Button & Query Library which looks very promising, although I have no personal experience with it.

Upvotes: 0

Lee Smith
Lee Smith

Reputation: 6747

Try here: http://ajaxpatterns.org/Unique_URLs

Upvotes: 2

Related Questions