How can I pass from this type of url:
http://domain.com
To this type:
http://domain.com/#0123456789
Without reloading the page.
I do not want to use the HTML5 window.history.replaceState function, as it does not work with the older versions of Internet Explorer.
royhowie
11.2k14 gold badges54 silver badges67 bronze badges
asked Nov 13, 2014 at 0:34
user4158797user4158797
2 Answers 2
I found my answer:
location.hash = "0123456789";
Sorry to answer my own question...but no answer gave the right point.
answered Nov 13, 2014 at 0:40
user4158797user4158797
Sign up to request clarification or add additional context in comments.
Comments
Like this:
window.location += "/#/123456";
console.log(location.hash);
answered Nov 13, 2014 at 0:43
Comments
lang-js
http://domain.com/#0123456789just make this a hyperlink - the page should not be reloaded as it is just a anchor link within the page.