views:

73

answers:

3

i've got a website that shows search results with ajax. but of course when i click on a thread in the results and then go back with the web browser back button the results are gone.

is there a way to go back to same result page displayed by ajax?

cause i really want to use ajax for certain tasks, but it wouldnt be nice if the user has to do the same search again each time he returned to the result page from the threads.

+1  A: 

You can find some useful info in this SO post:
AJAX and the Browser Back Button

PS: Check out the other answers and not just the accepted one, quite insightful.

o.k.w
+1  A: 

You could store a session variable on the server that gets updated to reflect user actions taken through the Ajax interface. Either that or use a cookie for state management.

Pierreten
+1  A: 

try ReallySimpleHistory

Really Simple History is a lightweight JavaScript library for the management of bookmarking and browser history in Ajax/DHTML applications. RSH serializes application data in an internal JavaScript cache so that bookmarks and the back button can be used to return your application to an earlier state.

TheVillageIdiot
should one use ReallySimpleHistory or Google Ajax Webkit?
weng