changed from pushState to window.location.hash as workaround for links when page is not yet in appcache