I want to update browser url without page being submitted.The URL can be anything, like xyz..Please help me.Thanks in advance.
This is what i have done so far.
if (history.pushState)
{
window.history.pushState({ "html": response.html, "pageTitle": response.pageTitle }, "", urlPath);
}
else
{
window.location.pathname = urlPath;
}
But the page reloads by using this. Why ? can anyone help me According to this article, pushstate wont refresh page http://spoiledmilk.com/blog/html5-changing-the-browser-url-without-refreshing-page/#comment-6552