I have a Ajax heavy application that may have a URL such as
http://mysite.com/myApp/#page=1
When a user manipulates the site, the address bar can change to something like
http://mysite.com/myApp/#page=5
without reloading the page.
My problem is the following sequence:
- A user bookmarks the first URL.
- The user manipulates the application such that the second URL is the current state.
- The user clicks on the bookmark created in step 1.
- The URL in the address bar changes from http://mysite.com/myApp/#page=5 to http://mysite.com/myApp/#page=1, but I don't know of a way to detect the change happened.
If I detect a change some JavaScript would act on it. Any ideas?