6 ms·
Is 'page size' alone enough to worry about this sort of thing? We don't download all the assets used every time we load a page. Just a thought, but the total s
by onion2k 13y ago
Is 'page size' alone enough to worry about this sort of thing? We don't download all the assets used every time we load a page.
Just a thought, but the total size of assets on the page ignores the use of caches and CDNs for common assets - if I visit 100 websites that all use Google's CDN to deliver jQuery I'll download a few hundred kbs and do 99 HTTP requests that return just a "nothing changed" header. The fact that those 100 websites are all a few hundred kb bigger than they were a few years ago means very little.
If I visit the same website every day for 100 days straight I'll probably only download jQuery once even if it's hosting the file itself because of my browser cache.
Obviously it's preferable if a site optimises things where it can, but I don't think a 150% increase in total page size equates directly to a 150% increase in data usage. It might for archive.org, but they're pretty atypical web users.
tl;dr Overall page size is less important than setting caching headers properly.
- jol 13y agook, but the article says that there is more images (btw, other media too), i.e. images make 50% of web page now and image size growth contibutes ~400KB out of ~900KB, images tend to change, given that top 1000 pages are dynamic, thus, no cache will help. Also I find it interesting that stylesheets are growing, given that css3 are more powerful now and IE6 is likely to be retired for most of these sites. What is interesting is what makes this "other" part? is it just webfonts or some media (also very cross-site cache friendly)?
- onion2k 13y agoImage size could include things for retina displays, higher standard resolutions, CSS sprites and so on. Again though, a lot of images in sites are standard reusable assets that are held in the browser cache between visits - it's just editorial and user-contributed content that won't get much benefit from a well configured http server. Sidenote: I found out about kraken.io on HN a while ago. I use it for all my images now. Usually gets at least 5% reduction on a well created picture, and 50%+ on a bad one. (No affiliate, just like it)
- jol 13y agoI don't think that CSS sprites should be bigger, given that css is improving, I don't know about the sample analysed, but usually the editorial and user-contributed content images (as well as ads) take much more bandwidth than style related images, unless the site has exotic design. aside: kranken.io is nice
- pwnna 13y agoI don't usually like to host my JavaScript elsewhere such as on the Google CDN. Are there any web standards in the works where you can specify a hash of a file to be cached regardless where it is?
- jol 13y agoI haven't seen one, but that would be very beneficial, it would not only make everything faster, but also avoid the privacy concerns and remove the additional point of failure that external CDN creates.
- pwnna 13y agoAbsolutely. Actually in that case we could just do something like this: <link rel="stylesheet" hash="b6792c2dcaafc7678f18236f6e7289152756a14f" href="...."></link> Now that I look at it.. where do we suggest this to the web people?
- MatthewPhillips 13y agohttp://lists.w3.org/ http://lists.w3.org/
- sp332 13y agoYou could use a magnet "link" (which is really just a hash anyways) to pull the file from the Kademlia DHT.
- jol 13y agowell, that would not work well with backwards compatibility, also it adds extra protocol to implement to browser vendors (extra bugs, here they come :)
- alanctgardner2 13y agoWhy, pray tell? Isn't the Google CDN: - faster for people in different geographic areas - at least as reliable as your infrastructure - already cached (this would be nullified by your proposal) I ask because normally I wouldn't think twice about using the Google CDN libraries.
- alec 13y agoA 2007 Yahoo investigation found 40-60% of Yahoo's users came to the site with an empty cache, accounting for 20% of page views. Empty cache experience is important. http://www.yuiblog.com/blog/2007/01/04/performance-research-part-2/ http://www.yuiblog.com/blog/2007/01/04/performance-research-...
- huxley 13y agoI'd be interested to see if this has changed much in the almost 7 years since that study was done.
- Joeri 13y agoIt depends on how much the browser caches have grown to compensate for page bloat. Ie8 and below had a limit of 50 mb for all sites, ie9 upped it to 250 mb.
- ams6110 13y agoMy browsers are all set to dump cache and cookies upon exit.
- coldtea 13y ago>Is 'page size' alone enough to worry about this sort of thing? We don't download all the assets used every time we load a page. Actually we do download most of them. Browser caches are mostly useless for most of the stuff, including widely use JS frameworks and fonts. There were a few widely circulated articles on this.
- ams6110 13y ago99 http requests still take some time even if the response is 304.
- mattmanser 13y agoThat's not how you cache. You shouldn't have any 304s for images, js or CSS. If you are, your setup is wrong. Mark minified js & CSS with a file hash in the path or query string & serve a far future expires header. Browser won't even 304 it and serve straight from local cache.