Reputation: 992
I'm building a web app with jQuery & Rails. The web app loads pages with AJAX ... no page refresh.
When a user clicks on a link to load a new page via AJAX, i want to update the address bar. I also want to maintain the browser's back button support.
ideas?
Upvotes: 4
Views: 1009
Reputation: 3121
I had the same demand on a project, this feature is called Deep link.
You just have to use a jQuery plugin called Address http://www.asual.com/jquery/address/, it makes everything easy. There is a wonderful documentation and examples on the site.
Upvotes: 2
Reputation: 9078
#page1
or #page2
; this will keep you on the same pagewindow.location.hash
Upvotes: 0