I want to refresh with new hash but it seems chrome just changes the hash instead of redirecting as it’s the same URL.
How can I do it?
window.location = "http://lujanventas.com/" + shopURL + "#" + name;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The simplest thing would be to slightly change the URL with a URL parameter to force the browser to reget the page:
By definition a hash change only is only supposed to just go to that hash – it isn’t supposed to reload the page so the way you have it now, it’s doing what it’s generally supposed to. Without explicitly doing a page reload first, you have to trick it into loading the URL over again when you change the hash. Adding a different parameter to the URL will trick it.