0

I have an html that is AppCached. I load it on the safari/firefox and everything's fine. then, I paste the same url and hitting enter in my keyboard, nothing happens (in Chrome it performs a reload).

The reason I'm interested in this scenario, is that I'm actually using URLs with hashtags, and I'm pasting the same URL, the hashtag is different and I wish the page to reload (this is the common use case in mobile when you click on links from email and such).

Can anyone explain why the browser won't reload?

oriharel
  • 10,418
  • 14
  • 48
  • 57
  • The whole point of using hashtags is that the browser won't reload the page if you change it, can you explain your use case more clearly? – robertc Jun 26 '13 at 13:17
  • Sure. I'm making web apps that uses the same base url, but differs only in their hash tags. I spread those web apps links in emails. so if a user receives a link, opens it and then receives another link, the browser won't do anything. only a refresh click will help here. – oriharel Jun 26 '13 at 13:59
  • 1
    If you want the page to refresh then you can't use hashtags, as I said the whole point of hashtags is not to refresh the page. It sounds like what you need to do is listen to the `hashchange` event instead of doing it all in the `load` event. – robertc Jun 26 '13 at 14:06

1 Answers1

1

If you want the page to refresh then you can't use hashtags, the whole point of hashtags is not to refresh the page when changing the URL. It sounds like what you need to do is listen to the hashchange event instead of doing it all in the load event.

robertc
  • 74,533
  • 18
  • 193
  • 177