Live data from Hacker News

The average size of Web pages is now the average size of a Doom install

mobiforge.com

141–150 of 467 posts

Re: The average size of Web pages is now the average size of a Doom install

#141

The Doom install image was 35x the size of the Apollo guidance computer. Thirty-five times! Apollo software got us to the moon. Doom wasted millions of man-hours on a video game. My point of course is that these comparisons are not actually that illuminating. Are web pages much heavier than they need to be? Yes. This presentation very capably talks about that problem: http://idlewords.com/talks/website_obesity.htm Do…

That link inspires me to print and bind the code of a webpage into a book, and put it on a shelf next to other literature masterpieces.

One Hundred Years of Solitude

The Count of Monte Cristo

Anna Karenina

Don Quixote

Amazon.com: Online Shopping for Electronics, Apparel, Computers, Books, DVDs & more

Re: The average size of Web pages is now the average size of a Doom install

#142
post #22

Earlier quoted context omitted.

jQuery is not that large and very likely to be cached an a users machine. So, it's IMO disingenuous to harp on it. If your playing with larger and less 'standard' library's then that's a different story.

There are approximately 5 million different CDNs hosting different versions of jQuery. Cache hits are actually quite low.

I have a small website that uses jQuery, but I by default point to the Google-hosted version (with a fallback to my own site if that fails), but I also use an older version that's a little over half the size of the current version.

What I'd like to see, however, is a way of trimming down jQuery to only include the functions I actually use. I only use two functions out of the whole library IIRC, so I really don't need to load the whole thing. Maybe one day when I have some spare time and other projects out of the way I'll try stripping those functions out of jQuery and just hosting them locally.

Re: The average size of Web pages is now the average size of a Doom install

#143
Looks like most of the discussion here is on network traffic.

Minifying JS and CSS, compression, CDNs and caching won't keep your browser from having to render all the stuff.

---

The stewardess on a new jet airliner:

- Ladies and gentlemen, welcome aboard of our new airplane. On the second deck you'll find a couple of bars and a restaurant. The golf course is on the third deck. You're also welcome to visit the swimming pool on the fourth deck. Now - ladies and gentlemen - please fasten your seatbelts. With all this sh*t we'll try to take off.

Re: The average size of Web pages is now the average size of a Doom install

#144

Earlier quoted context omitted.

> If everyone simply linked the "canonical" version of jQuery (the CDN link is right on their site) then requiring jQuery will be effectively free because it will be in everyone's cache. So create one massive target that needs to be breached to access massive numbers of websites around the world? Imagine if every Windows PC ran code from a single web page on startup every time they started up. Now imagine if anything…

The solution to this is including a checksum with the link to the file, and if the checksum doesn't match, don't load the file. See https://developer.mozilla.org/en-US/docs/Web/Security/Subres... though it isn't universally supported yet.

Just so I understand, I pull the file and make a checksum, then hardcode it into the link to the resource in my own code? Then, when the client pulls my code, follows the link, checks the checksum against the one I included in the link.

Re: The average size of Web pages is now the average size of a Doom install

#145
post #96

Earlier quoted context omitted.

I hear this argument a lot, and I very much disagree. Now you have browser vendors having to device which libraries are "popular" and shipping them in the initial download of the browser. It turns out that this technology already exists in a much better form. It's called cache. The problem is that almost everyone hosts their own version of jQuery. If everyone simply linked the "canonical" version of jQuery (the CDN l…

The problem with caching is that you're sharing the referer with the canonical URL. Another problem is that you're using someone else's bandwidth. And if you combine the two, you can be sure that info about your visitors will be sold, which is why quite a lot of people would prefer to host their own versions of jQuery...

For the referrer problem you can apply a referrer policy to prevent this but unfortunately the referrer policy isn't very granular.

Also for my sites I have a fallback to a local copy of the script. This allows me to do completely local development and remain up if the public CDN goes down (or gets compromised). With small (usually) performance impact.

Re: The average size of Web pages is now the average size of a Doom install

#146
post #61

Earlier quoted context omitted.

That's still 84 KB of highly compressed javascript code to parse and execute. Even on a 4.4 GHz CPU core and a cached request, jquery takes upwards of 22ms to parse - that's just parsing - not even executing anything! Now add a bunch of other frameworks and utility scripts and your 100ms budget for feeling "fast" is gone before you even reach the HTML content.

That's a fair point, though my threshold for fast is probably a bit higher than 100ms. That might be a conditioned thing, though.

It's not much higher than 100ms

https://www.nngroup.com/articles/response-times-3-important-...

Re: The average size of Web pages is now the average size of a Doom install

#147
post #75

Quite happy with my own web page/blog. Pages hover at around 10kb, 30kb if I include some images. I think the page size can be attributed a lot to there being no JS except for GA. I have taken a lot of inspiration from http://motherfuckingwebsite.com/ and http://bettermotherfuckingwebsite.com/ Of course the size will differ depending on the site's purpose, but I feel like most web pages could stand to loose a lot of…

Great writeup! I might try this out later and see how it fairs. I haven't used the Jekyll + GitHub combo yet but I have heard great things.

Re: The average size of Web pages is now the average size of a Doom install

#148
post #49

Earlier quoted context omitted.

I would say that a possible solution is also to better rank websites that mention the checksums of their external resources and make web browsers keep them in cache much longer... if pretty much every website uses jQuery, perhaps we should ship jQuery with the web browser?

I hear this argument a lot, and I very much disagree. Now you have browser vendors having to device which libraries are "popular" and shipping them in the initial download of the browser. It turns out that this technology already exists in a much better form. It's called cache. The problem is that almost everyone hosts their own version of jQuery. If everyone simply linked the "canonical" version of jQuery (the CDN l…

I agree with you that putting JQuery in the browser is a bad idea, but the second part of the argument, that the browser will have the libraries in cache is not really that reliable. Here's some notes I collected on the subject: http://justinblank.com/notebooks/BrowserCacheEffectiveness.h....

Re: The average size of Web pages is now the average size of a Doom install

#149

The Doom install image was 35x the size of the Apollo guidance computer. Thirty-five times! Apollo software got us to the moon. Doom wasted millions of man-hours on a video game. My point of course is that these comparisons are not actually that illuminating. Are web pages much heavier than they need to be? Yes. This presentation very capably talks about that problem: http://idlewords.com/talks/website_obesity.htm Do…

> Apollo software got us to the moon. Doom wasted millions of man-hours on a video game. Well, to be honest, Episode 1 and Episode 2 of Doom takes place on Phobos and Deimos, so you could say Apollo software got us to the moon but Doom got us to Mars :)

Since 2.1 megs is only the compressed size of the shareware distribution[1], we are not going any further than Phobos. Since this is only for v1.0, it is going to be a buggy Phobos.

[1] http://www.doomarchive.com/ListFiles.asp?FolderId=216&Conten...

Re: The average size of Web pages is now the average size of a Doom install

#150

Earlier quoted context omitted.

I hear this argument a lot, and I very much disagree. Now you have browser vendors having to device which libraries are "popular" and shipping them in the initial download of the browser. It turns out that this technology already exists in a much better form. It's called cache. The problem is that almost everyone hosts their own version of jQuery. If everyone simply linked the "canonical" version of jQuery (the CDN l…

What if the checksum was the same and you accepted the cache hit if the checksum agrees and get your own copy if it doesn't? Maybe the application should get to declare a canonical URL for the js file instead of the browser? So something like https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.m... sha-256="31be012d5df7152ae6495decff603040b3cfb949f1d5cf0bf5498e9fc117d546"> Would this cause more problems than i…

It would be interesting if browsers start implementing a content-addressable cache. So as well as caching resource by URI also cache by hash. Then SRI requests could be served even if the URL was different.

Of course this would need a proposal or something but it would be interesting to consider.

Post reply on HN