Yahoo Tool for Bandwidth Optimization

Yahoo has come out with a nice add-on to the Firebug extension for Firefox, called YSlow. The idea behind this add-on is to help identify bottlenecks in your website and offer advice on how to improve the situation through tweaking the server configuration. I tried it out on various sites I run here and the results were less than stellar - most of my stuff rated a "D" at 64%. This was mainly due to cache expiration headers and uncompressed javascript and CSS files being thrown about. The end result being that a lot more stuff is being sent over the wire than needs to be, like images on the page that never change anyway. It surely accounts for some of the staggering figures I see in the bandwidth monitoring I'm doing.

After spending some time looking for the Apache options to help with this, I came up with some really simple stuff that can be applied to the global configuration:

AddOutputFilterByType DEFLATE text/css application/x-javascript
ExpiresActive On
ExpiresByType text/css "modification plus 10 years"
ExpiresByType application/x-javascript "modification plus 10 years"
ExpiresByType image/gif "modification plus 10 years"
ExpiresByType image/jpeg "modification plus 10 years"
ExpiresByType image/png "modification plus 10 years"

According to the Yahoo analysis, "plus 10 years" gives it a "far future" expiration which essentially tells the browser to hang on to it forever. Or obviously until the user decides to purge their cache. Because certain forum critical HTML was not updating to the user properly I had to leave text/html out of this, but that's probably the least of my worries. After having done all this and purging the browser cache in Firefox, my performance ratings on all the sites I checked rose to a "B" at 88%. But some of the things you get dinged for with this don't seem fair.

So I have bandwidth data from the 4 highest usage sites I host which covers the last 30 days. 30 days from now I'll go back and look at what the usage figures show then. I have no idea what kind of monthly variance I have now but as far as I know it doesn't change much. The sites I'm looking at are consistently high traffic. I'll also be able to compare the Google Analytics figures for how many visits 2 of the 4 sites get. It should provide solid enough data to know if Yahoo is blowing smoke or this stuff actually works.
"It is pointless to resist, my son." -- Darth Vader
"Resistance is futile." -- The Borg
"Mother's coming for me in the dragon ships. I don't like these itchy clothes, but I have to wear them or it frightens the fish." -- Thurindil

Well. I guess that's that then.

« Site Tweaks and Index Nudging
Endeavour Damaged »

Posted on Aug 6, 2007 9:25 am by Samson in: | 9 comment(s) [Closed]
Sounds like in 30 days we'll have some very interesting feedback coming from you about this. I'd read (in the news) about Yahoo's new toy, but hadn't bothered trying it out myself yet.. partially from fear of what it'd have to say about my sites. ;)

But tips that actually work to reduce bandwidth costs are always welcome, so at the very least I'll be watching to see what your one month later analysis reveals about this. :)

So hosting porn is lucrative?

Whir said:

So hosting porn is lucrative?

Um, I'd imagine that it probably is considering how much of it is hosted out there, but I'm not sure what any of that has to do with what was being discussed. :(

Actually hosting it wouldn't be all that lucrative. Selling the subscriptions to the idiots who want them would be though.

While I still don't quite know how this relates to the topic, I can see your point. Hosting such sites probably isn't any more lucrative than hosting any other site (unless it's a popular site and you're charging for the hosting based on hit counts or some such), it's owning the sites that is lucrative with the porn industry.

Whir's sarcasm was probably lost in the text. Really lost this time since I wasn't sure what he was getting at either :)

Ah, then at least it wasn't just me. ;D

"partially from fear of what it'd have to say about my sites. ;)"


Oh, I get it. No, I just meant that most of my web pages are hand written in a text editor, and I know my html is far from perfect to begin with, so I hate to run validator type things against them because it usually means a huge list of errors that I don't always know/care how to fix anyway.. though it's funny that you'd chosen to interpret it that way as years ago (more than a decade now) I did actually run a "porn" site too: my BBS was pay to play and strictly adults only. ;D

<< prev 1 next >>
Comments Closed
Comments for this entry have been closed.

Forgot Password?

 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31