Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Newer browsers ( http://caniuse.com/#search=history ) can manipulate the url without needing the #! hack.


To be specific, it's just the # hack, or fragment hack if you like. The bang leading the fragment is a Google-specific thing to help the Googlebot crawl your content.

http://stackoverflow.com/questions/3009380/whats-the-shebang...


<strike>No, timb was referring to HTML5 history api. It makes possible to alter the path component of a URL by javascript, eliminating the need for # hack. Try browsing repositories on github with WebKit-based browser to see a real world example.</strike> (sorry for my misreading)


And raganwald was referring to the '#!' hack, since it's really just the '#' hack. He wasn't addressing the history api.


However all those IE users out there would not have that API. I remembered that facebook's starting to use that API already.

The solution with "mangled" URL seems to force a reload on every new request to lifehacker as well. Just like what Facebook did with the hash-reload.


Thanks for the link. I had not realized that pushState would allow for URL address change w/o reloading the page. Unfortunately the support is far from ubiquitous (Firefox support requires the current beta).

I think what the author of this diatribe fails to understand is that the separation between the part of a site that uses client side navigation, vs the part that uses sever side navigation is an architectural design choice - not an aesthetic choice of how a developer wants their URLs to look.

Client side navigation has performance benefits, ability to use web apps offline, etc. These are all valid reasons to choose to use it. It may not be ideal that the end user is exposed to that detail by breaking the URL up between the "server part" and "client part" separated by the # character. But that's where we are today in browser design.

I don't buy the argument that the # scheme makes a web site more fragile. You can break the server side of your app just as easily as you can break the client side.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: