5

I have a website which is AJAX enabled for a great part.

My client now of course wants the browser buttons to behave as expected, which means the page should revert to the previous states when the 'back' button is pressed and so on.

I know there are solutions for this use case, the most interesting one being (seemingly) history_js and its fellow Statehandler module.

I didn't test it yet, because it seems to be heavily based on coding - which I could handle - but I wonder if there is a more elegant (mean : abstract) solution.

The following points are mandatory :

  • It must work with AJAX Views, including dynamic filters.
  • It must work with custom AJAX links.
  • It would be wonderful if it worked with popups (Colorbox style for example), but I think it's a lot to ask for so I could do without it.

What is your experience with AJAX browser history in Drupal 7 ? Any hint on the pitfalls you encountered would be very appreciated. A working solution or a good tutorial would be amazing.

1

For utilizing browser history and reload buttons with AJAX request, you can use the jquery plugin "jQuery Address" http://www.asual.com/jquery/address/

| improve this answer | |
  • Looks interesting, will give it a try when I'll have time. I upvote your answer, but be aware that just posting links is not considered a good enough answer here. Thanks for your contribution anyway. – Countzero Jul 20 '12 at 9:06
  • @tekilatexee Did you get a chance to try this out? – Web Assistant Oct 5 '12 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.