3 ms·
You also want it to change so that you can add to the browser history -- so the back button will work. The hash is actually an outdated method now, it's import
by wahnfrieden 16y ago
You also want it to change so that you can add to the browser history -- so the back button will work.
The hash is actually an outdated method now, it's important to note. HTML5 introduced replaceState and pushState which allow rewriting the parts of the URL after the domain with JavaScript. So no more hashes in the URL except for page anchors.
- robryan 16y agoTrue, the hash method works everywhere though with little changes, if you go the new html5 method you need to support both that and the hash method for the IE7, etc.
- wahnfrieden 16y agoOf course, you will just use an abstraction which detects if that feature is available and falls back to hashes. Feature detection and graceful fallbacks is par for course with JS.