I'm developing a web app. In it I have a section called categories that every time a user clicks one of the categories an update panel loads the appropriate content.
After the user clicked the category I want to change the browser's address bar url from
www.mysite.com/products
to something like
www.mysite.com/products/{selectedCat}
without refreshing the page.
Is there some kind of JavaScript API I can use to achieve this?
Best Solution
With HTML5 you can modify the url without reloading:
If you want to make a new post in the browser's history (i.e. back button will work)
If you just want to change the url without being able to go back
The object can be used for ajax navigation:
Read more here: http://www.w3.org/TR/html5-author/history.html
A fallback sollution: https://github.com/browserstate/history.js