44 Comments
- Snarfalunch, on 10/12/2007, -0/+18No digg for noobs. Google and Slashdot use HTTP compression and content encoding. Something Awful does not BTW. Bandwidth isn't measured by the size of files on a HDD after fetching a page, it's measured by bits sent on the wire over time. There's a hell of a lot more to site optimization than measuring the files served.
- geminitojanus, on 10/12/2007, -0/+3The problem is that after removing the whitespaces, you have a very nasty effect of making the pages very difficult to debug for future purposes.
I guess you /could/ implement an apache module that automatically ripped the whitespace from the item before it was sent down the pipes, or just modify mod_gzip to do it, but that seems like a lot of work for a tiny bit of bandwidth. 200GB of bandwidth is a paltry price to pay for a company like Google who likely block-allocates bandwidth in the multiple terabytes range. But the PNG suggestion is a good one, and I hope Google does listen to them on that. All modern browsers support them, they're more compressed, and they support better alpha (and it's not like Google's using those Gifs for animation). The only reason I see to keep them around is the G.. Google Image Format ;) - aubrey, on 10/12/2007, -0/+1andy2005 - How many people do you think still browse with netscape 4 or IE 3? One? Two? According to one of my sites that has gotten just over 2.5M page views this month, 23 came from Old Netscape and 1 came from IE.rnrnEven lynx supports gzip compressed pages these days. rnrnJust saying that one might as well consider that every browser can and does support gzipped pages these days and saying otherwise is spreading outdated information, even if it is technically accurate. People probably did still used those old browsers 4-5 years ago.. but not now.
- LKBM, on 10/12/2007, -0/+1Google's CSS is embedded. <style> to </style> (inclusive) is 5494b on the results page. (Though, I'm logged in, so there may be extra for the Notebook and stuff.)
- interiot, on 10/12/2007, -0/+11. note gzip in Google's response headers
2. aim gun
3. shoot foot - djgraphite, on 10/12/2007, -0/+1Snarfalunch has it just right. Things are compressed before they pump it down the pipe. I doubt Google is "wasting" any bandwidth. I'd say that they are getting their moneys worth out of it.
- LKBM, on 10/12/2007, -0/+1And what percentage of users does the article assume doesn't support gzip in order to come up with 200GB of daily waste?? 100%? I'd expect it to be pretty low.
- arakel, on 10/12/2007, -1/+2I find it ironic that the submitter spelled "a lot" as "alot".
- DJB31st, on 10/12/2007, -0/+1Before writing this, you should have looked at Google's headers and realised they use Gzip compression, thus invalidating this whole article.
#6 Alex on 2006-01-17 11:26 (Reply)
:-/ - silvyn, on 10/12/2007, -0/+0Even more suprising to me was that something awful has thrice the daily hits of slashdot...
- nads, on 10/12/2007, -0/+0is that a image ad on the right? first time ive seen it >:(
- lifeforms, on 10/12/2007, -1/+1Oh my GOD, 200 GIGS!!!! of WASTED BANDWIDTH!!!! (digg-ized the text for all you readers)
That must cost them perhaps $500!!! EACH AND EVERY MONTH!!!!!!!
HOLY SH!T!!!!
SELL UR !!GOOGLE!! STOCK!!! - wtfunkymonkey, on 10/12/2007, -0/+0thats really surprising actually.
- IceColdFever, on 10/12/2007, -0/+0Good thing to think about. But like other people said, compression takes care of it and if you actually get rid of all your whitespaces in your code, troubleshooting your source would be a nightmare.
- inactive, on 10/12/2007, -0/+0If you are as big as google, its not that hard to test and debug a page, then have a copy with just removed whitespaces to put in the live environment. Even the University I work for has a dev environment for thier websites, and we would be lucky to get 1,000,000 hits a month, let alone 24mill a day.
- skewminded, on 10/12/2007, -0/+0Great article...for somebody who has no idea how www works.
1. More than likely that images are cached, thus google page size is reduced to 3k
2. By using gzip in http header it is further reduced to less than 1 k
3. Very likely that this page is cached in your browser or on your proxy server
4. 200 gig/day costs at most few hunded $$/month, it is literally nothing by serious bandwidth scale - inactive, on 10/12/2007, -0/+0Says in there that according to slashdot itself, they get alot of hits per day. more than the stats site said. so they beat something awful.
- spectre, on 10/12/2007, -0/+0Too bad so many people use the internet and so few know anything about how it works. As mentioned multiple times above the compression occurs before the pipe and decompresses after. Google's people are not amatuers, but whoever wrote (and Dugg) this article are.
- LatvianHedgehog, on 10/12/2007, -0/+0nice info, digg
- amigiac, on 10/12/2007, -0/+0no digg
MSN.com is a waste, just have a look, it is plastered with images, flash and adverts. MSN may not waste bandwidth getting it to you, but most of what they deliver is a waste. - apotropaic, on 10/12/2007, -0/+0These guys are freakin n00bs! Why didn't they even use a packet analyzer for this?
- Bogtha, on 10/12/2007, -0/+0While Snarfalunch's point is a good one, it doesn't mean Google aren't wasting tremendous amounts of bandwidth. They could save a hell of a lot just by switching to external stylesheets and Javascript. That's much more than whitespace savings, and isn't affected by compression.
- mogebier, on 10/12/2007, -0/+0This doesn't even rate a blip on my patented "Give-a-crap-o-meter"
- pjvdg, on 10/12/2007, -0/+0Big deal... No digg
- dognose, on 10/12/2007, -0/+0Have you every looked at Yahoo's homepage source? All the links are a like 2 letters. All the css variables are 1 letter... yet they have a much bigger homepage than google!
- spacebar14, on 10/12/2007, -0/+0Very surprising.
I agree though, MSN might now waste bandwidth getting here, but the entire page is a load of garbage :( - Otto, on 10/12/2007, -0/+0As noted, use of gzip compression really negates the impact of whitespace and comments and anything else in the HTML or CSS (or any other text) sources. Removing whitespace and comments will still gain some space savings, but you're probably really talking tens of bytes, at most. Text compresses very, very well.
Use of PNG as opposed to GIF, while preferred, has its problems. Not all browsers render PNGs correctly (IE, for example, can't render PNG transparency properly). Also, some browsers don't support PNGs at all (your mobile phone might not like PNGs, for example), and while this can be worked around by serving different content based on the useragent, it's one-more-damn-thing to deal with. And finally, PNG doesn't *always* compress better than GIF. Most of the time, sure. But GIF is still better in some unusual cases (none of which probably apply in his analysis, but still). - phill, on 10/12/2007, -0/+0On a side note, I've noticed many times that MSIE does render white space and newlines. I have to remove them so the "valid" pages I create will render correctly in MSIE. MSIE will place gaps and newlines where I don't want them. So my HTML becomes one long string of text on one line.
PS, I hate the stupid captcha. - andy2005, on 10/12/2007, -0/+0Regarding compression and before anyone starts the childish name calling:
The HTTP server will only return compressed content, if and only if the browser declares it can handle the compressed data. So the article is still valid for those older browsers which are still requesting uncompressed content.
Read up on the Accept-Encoding: HTTP header for more info -- before you bitch like 5 year olds. - Bogtha, on 10/12/2007, -0/+0> Use of PNG as opposed to GIF, while preferred, has its problems. Not all browsers render PNGs correctly (IE, for example, can't render PNG transparency properly).
No, Internet Explorer can render PNG *transparency* properly. It can't render PNG *translucency* properly. In other words, it's fine for alpha=0 and alpha=1, but not for values inbetween. Since GIF doesn't support translucency at all, you are never going to find a GIF that, when converted to PNG, causes this problem in Internet Explorer.
There's only one reason to pick GIF over PNG these days, and that's if you want animation. As far as I am aware, none of Google's GIFs are animated. - valkraider, on 10/12/2007, -0/+0Besides, define "wasting"?
somethingawful.com is 100% wasted bandwidth, no matter how you compress it.
[relax - it's a joke] - v3xt0r, on 10/12/2007, -0/+0I worked at a company that designed all their web sites in dreamweaver, with CSS and JavaScript embeded in EACH html file. I stated my case (HTML Programming vs. WYSIWYG Generated Code, optimization, bandwidth, hd space, etc), but that wasn't enough to convince management at the time.
They were more concerned about quantity deployment, rather than quality deployment.
Needless to say, I no longer work there, and do not miss having to manually delete all that nasty WYSIWYG code. - spyhunter, on 10/12/2007, -0/+0If the poster had *actually* looked at Google's HTML, he would have seen that it is already stripped to the bone (look for yourself, I don't consider five or six newlines to be an extravagant waste of bandwidth). Google doesn't do this to save them bandwidth, because bandwidth is cheap. Instead Google does this so their pages load fast. Google sometimes doesn't optimize every possible thing for browser compatibility reasons (i.e. PNG vs GIF, new web standards vs old).
- mathie, on 10/12/2007, -0/+0Even though the analysis might have flaws, content optimization + content compression are distinctive. See the source for AdSense:
http://pagead2.googlesyndication.com/pagead/show_ads.js
It's already quite compact before the webserver gzipped it further. I don't believe that is the same javascript version developers are viewing internally, I imagine they would see comments and meaningful function names - Haplo, on 10/12/2007, -0/+0"I guess you /could/ implement an apache module that automatically ripped the whitespace from the item "
There is even something better: a module that gzippes the page if the client supports it. - Peat, on 10/12/2007, -1/+0lol, dugg by kevinrose
- Guspaz, on 10/12/2007, -1/+0200GB/mth is pittance to Google. I pay $69/mth for 1200GB/mth, so by linear scale, they are wasting $11.50
OHNOES! TWELVE DOLLARS WASTED BY A MULTIBILLION DOLLAR CORPORATION!!!
Oh wait. That's right, they use gzip. Reported as lame. - abbtech, on 10/12/2007, -3/+1Is the number of visitors accurate?? Never heard of somethingawful.com before...
-------------------------------------
http://hackedgadgets.com - aliencode, on 10/12/2007, -4/+0BAHAHAHAHA WHAT A FAWKING NOOB. YOU CLUELESS LITTLE DIGG DORKS LOL. GZIP HELLO. I SWEAR YOU NEED SOME PRON TO ENLIGHTEN YOUR LIVES.
What is Digg?
Browsing Digg on your phone just got easier with our enhancements to the