I use AJAX to load a page with a list of links. If the user clicks on one of the links they may eventually press their browser's back button and return to the list. Right now if they press the back button the first page returns back to its empty state, and AJAX will have to reload the list again.
Is there any way to create a "snapshot" of the page when the user clicks away and return to that point when a user clicks their back button?
I keep reading how url hashs might work, but it seems like the user never really leave the first page whereas my users are actually returning from a competently different page.
Will add a record to the user's browser history without reloading the page.
Unfortunately, the browser doesn't send the anchor part of the URL with a HTTP request, so server side languages can't pick up on it. It's really just used so that AJAX driven sites can have specific parts of the site bookmarked by the user
(check window.location.hash - fire AJAX event tied to that anchor).
If you want to have URLs changing with an AJAX driven site that the server side can pick up on, you'll need to look into the HTML5 history API - I'm not aware of another way to do it.