Search code examples
htmlgoogle-chromefirefoxsafarihtml5-appcache

Loading same AppCache - based url won't work on firefox and safari


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?


Solution

  • 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.