JQuery - using loading and updating URLs in the address bar with back button support

I am building a web application with jQuery and Rails. A web application loads pages using AJAX ... page refresh.

When a user clicks on the link to download a new page via AJAX, I want to update the address bar. I also want to support browser button support.

ideas?

+4
source share
2 answers

I had the same demand for the project, this feature is called Deep link.

You just need to use the jQuery plugin called Address http://www.asual.com/jquery/address/ and everything is simplified. The site has great documentation and examples.

+2
source
  • Link to, for example. #page1 or #page2 ; this will keep you on one page.
  • Bind a function to these links that retrieves window.location.hash
  • Download the relevant data, depending on the hash information received.
0
source

All Articles