I have a small site hosted on Dreamhost.
Yslow Score with default setting is C, or 77.
Later I do the following optimization to increase it to B, or 89. Based on Yslow v2 test.
The key is to change .htaccess file.
Put following content into .htaccess file on root of the site.

FileETag none
ExpiresActive On
ExpiresDefault A86400
ExpiresByType application/javascript A8640000
ExpiresByType application/x-javascript A8640000
ExpiresByType text/css A8640000
ExpiresByType image/x-icon A8640000
ExpiresByType image/gif A6048000
ExpiresByType image/png A6048000
ExpiresByType image/jpeg A6048000
ExpiresByType application/pdf A6048000
ExpiresByType text/html A300
AddOutputFilterByType DEFLATE text/css application/javascript

The second improvement I made is do not use external domain’s images. Put all images on the same site. It reduce the DNS loolup time.
It took me about 10 minutes to implement this optimization.

David Yin

David is a blogger, geek, and web developer — founder of FreeInOutBoard.com. If you like his post, you can say thank you here

One Reply to “How to increase Yslow score from C to B at Dreamhost”

Leave a Reply

Your email address will not be published. Required fields are marked *