Skip to content Skip to sidebar Skip to footer

Back And Forward Buttons To Control Ajax Loads

hallo together, i am searching for a solution, where the back and forward buttons control my ajax-call history. so if i maka a ajax call, and then press 'back' i want to reload the

Solution 1:

You should save your ajax "state" in the document location hash (i.e. http://page-url#ajax-state ).

If you modify just the hash component, the browser won't do a page reload, but the browser history will record a change of URL. Therefore, when you press back, you'll be able to re-play the ajax call based on the information stored in the document hash.

See also this question: Detecting Back Button/Hash Change in URL


Post a Comment for "Back And Forward Buttons To Control Ajax Loads"