3 ms·
If you're starting on a new app today then I'd suggest to embrace the history-API instead of entering the world of pain that is hashtags. http://caniuse.com/#s
by moe 16y ago
If you're starting on a new app today then I'd suggest to embrace the history-API instead of entering the world of pain that is hashtags.
http://caniuse.com/#search=history http://caniuse.com/#search=history
Adoption will sky-rocket when Firefox 4.0 rolls out, as that is the last major browser to not support it yet.
Oh yes, and then there's IE... This is where my suggestion becomes opinionated: Screw IE and display a polite message to the remaining IE-visitors.
- Skalman 16y agoWell... I don't see how ignoring IE would change that much for those visitors, if the pushState is used only as progressive enhancement. I probably wouldn't even display a message to them. On the other hand, if dynamic changes are essential, we'll have to support hashbangs too.
- chris_j 16y agoI knew nothing of the HTML 5 history API until I read this. I found this page in the Mozilla docs to be fairly informative: https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history https://developer.mozilla.org/en/DOM/Manipulating_the_browse... I look forward to the day when this API is supported by all the major browsers. In the meantime, the article suggests a sensible-looking set of steps for gracefully degrading.(and using hash-bang URLs as little as you can). The frustrating thing about all this is that, until HTML 5, there hasn't been any way of causing the contents of the URL bar to change to an arbitrary URL within your site without reloading the page.