Hi ,
My question is how to change the url while the page uses AJAX??
I noticed that a site like facebook when I watch photos .... the photos changes (AJAX) and the url changes with the photo id
How can I do something like this?
AJAX and bookmark problem
Moderator: General Moderators
- the_last_tamurai
- Forum Commoner
- Posts: 87
- Joined: Wed Feb 28, 2007 8:24 am
- Location: cairo
- Contact:
Re: AJAX and bookmark problem
I don't know about facebook, but only way i can think of is to change hash not the url
And each time page is loaded hash needs to be checked and previous state restored, otherwise it's useless.
Code: Select all
var pos = document.location.href.indexOf('#');
if (pos != -1) document.location.href = document.location.href.substr(0, pos);
document.location.href += + '#myPhoto1';