4 ms·
I think having a consistent permalink helps to encourage better linking. The more redirects you have before a link reaches it's destination URL the less juice y
by underdown 16y ago
I think having a consistent permalink helps to encourage better linking. The more redirects you have before a link reaches it's destination URL the less juice you get. From a "going forward" perspective it makes some sense to enforce the hash bang.
- benologist 16y agoWhy did the hash bang make sense at all though? What was wrong with twitter.com/username that hash bangs somehow fix?
- robryan 16y agoI guess the main technical reason is that if your on one page and click to another, you want the url to change so that if you copy and paste the link it's from the url of the page you are on. If you have proper separate links to the the other page I assume updating the address would trigger a new http request? In terms of just loading the ones page I don't see any reason why you couldn't use the normal structure and have js get what it needs for an ajax request from that.
- wahnfrieden 16y agoYou 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.