Return to Snippet

Revision: 59162
at August 22, 2012 02:05 by dnnsldr


Initial Code
document.location.hash = "show_picture";

Initial URL
http://stackoverflow.com/questions/6478485/jquery-change-the-url-address-without-redirecting

Initial Description
//You cannot change the whole url without redirecting, what you can do instead is change the hash.

//The hash is the part of the url that goes after the # symbol. 
//That was initially intended to direct you (locally) to sections of your HTML document, but you can read and modify it through javascript to use it somewhat like a global variable.

Initial Title
Change URL without refreshing

Initial Tags
url, redirect

Initial Language
JavaScript