3 ms·
I can understand people's frustration when the hashbang feature breaks the URL function in the browsers, but it can work nicely if done right. I've built one o
by ww520 16y ago
I can understand people's frustration when the hashbang feature breaks the URL function in the browsers, but it can work nicely if done right. I've built one of my apps using hashbang to encode the browsing state, and had gone to great length to ensure bookmarking and back button work correctly in the browsers.
It works great at the end. Every URL points to a specific page and still gets the Javascript interactivity. Some sample URLs.
http://www.previouslook.com/hnews/new#!2011-03-01-15-15.22 http://www.previouslook.com/hnews/new#!2011-03-01-15-15.22
http://www.previouslook.com/hnews/new#!2011-03-01-12-15.15 http://www.previouslook.com/hnews/new#!2011-03-01-12-15.15
http://www.previouslook.com/hnews/new#!2011-03-01-12-45.12 http://www.previouslook.com/hnews/new#!2011-03-01-12-45.12
- wmf 16y agoIf you've gone to great length already, then maybe it isn't much additional work to support the HTML5 history API and also provide server-side rendering to non-JS clients. (BTW, that's a pretty cool site.)
- mushtar 16y agoIt's impossible to provide a server-side fix, since the URL fragment (the part after the hash mark) does not get sent to the server.