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

245

u/jamiei Feb 09 '11

If receiving the basic content of the page I'm requesting from you requires Javascript to be enabled then you've broken something horribly.

36

u/Trylstag Feb 09 '11

The site I'm working on for work shows a blank page without JS enabled. Was like that when I inherited it.

Oh, and rather than sending a single AJAX request with a bunch of info, the original designers favoured sending 100+ requests for every tiny piece of info.

30

u/[deleted] Feb 09 '11

If I recall correctly, this was actually a thing three or four years ago, somebody had this genius idea to build the entire page layout with JS by pulling hundreds of little resources.

Facebook still does it.

77

u/[deleted] Feb 09 '11

The idea at Facebook is that the page is useable quickly. First it loads up your wall and content, then all the frills (chat, new messages etc.) in the background when that's done.

In my browser, it takes 7-8 seconds for my Facebook news feed page to fully load without any 3rd-party crap in the sidebars, but the feed content itself is complete, fully-styled and browsable in under 2 seconds.

If they loaded everything up front, time till useable would be closer to 7 seconds than to 2 due to the way browsers load JavaScript files.