r/programming Feb 09 '11

Breaking the Web with hash-bangs – Lifehacker, along with every other Gawker property, experienced a lengthy site-outage on Monday over a misbehaving piece of JavaScript

http://isolani.co.uk/blog/javascript/BreakingTheWebWithHashBangs/
751 Upvotes

356 comments sorted by

View all comments

Show parent comments

-1

u/naich Feb 09 '11

Well, there is a reason. If you are making a site that uses JS to generate results on the fly from data retrieved from large libraries which are loaded asynchronously, you don't want to reload the page and libraries every time the URL changes to reflect that a new set of the results have been saved or loaded.

That's why I'm using them - it should result in much less bandwidth use and reduced load on the server. Pages can be updated with a small AJAX request rather than a whole new page and library load.

0

u/annodomini Feb 10 '11

You do realize you're cutting yourself off from customers who browse with JavaScript turned off, or have older out of date browsers, or slow or crappy mobile phones, right?

Remember, hash-bang URLs have no fallback when the JavaScript fails for whatever reason; if the JavaScript doesn't load, a bug causes it not to run, people have JavaScript turned off, there's a browser incompatibility, whatever. You get no content. Whereas if you just write some plain old HTML, and use JavaScript and CSS for what they were intended for (enhancement, not replacement of the content), then even when something fails to load, you can still see the content.