Possible Duplicate:
How to show Ajax requests in URL?
Like in Gmail, using PHP if we need to have similar functionality of navigating to different internal links, how could we do it?
For example, from inbox, a specific email gets opened and when I click back button it takes me back to inbox. The addresses are https://mail.google.com/mail/?shva=1#inbox and #inbox/something for a specific email.
Gmail uses an
IFRAMEto implement history/navigation. When you click some links, it adds a new location by setting dynamically iframe source. Browsers take this as a change in the address, and so add a new history item. You can then use pre/next buttons.GWT implements similar functionality (on which Gmail is built). Do not implement this yourself, as many Javascript libraries already implement this for you. You can use this YUI or this jQuery plugins for instance.
There is actually nothing (unless server-side code) to be written in PHP. This kind of history management is totally handled by Javascript and client-side code.