3 ms·
There is no way you can change the URL (not fragments) without refreshing the page (a.k.a single page app) if the browser doesn't support history.pushState. IE
by riobard 15y ago
There is no way you can change the URL (not fragments) without refreshing the page (a.k.a single page app) if the browser doesn't support history.pushState. IE doesn't. That's why people are stuck with hashbangs.
- wahnfrieden 15y agoThe parent's method is still the best way as long as you do it by using replaceState or pushState where available, falling back to modifying the hash. This way, if Javascript is off, links in the HTML still work. (I suspect this is what he meant too, since changing links to modify window.location via Javascript provides no practical difference.)
- riobard 15y agoThe parent said “You don't need to use hashbangs or fragments for this”. I'm just pointing out there is no way to _not_ use fragments and still have a single page app. I do agree that we should probably leave IE users to reload pages and provide graceful degradation. Modern browser users will enjoy the benefit of no refreshing on single page app. However, for some, this is not an option.