YSlow - Helping slow web pages load faster

13 Steps to Improving Webpage Performance



Make fewer HTTP requests

Use a CDN

Add an Expires Header

Gzip components

Put CSS at the top

Put JS at the bottom

Avoid CSS expressions

Make JS and CSS external

Reduce DNS lookups

Minify JS

Avoid redirects

Remove duplicate scripts

Configure ETags



Reducing HTTP Requests on page load

Minify Javascript for performance improvements

Enabling GZip on Apache

.htaccess

AddOutputFilterByType DEFLATE text/javascript application/x-javascript text/css text/html

Expire Headers and Etags for Apache

.htaccess file

ExpiresActive On ExpiresDefault A29030400 Header append Cache-Control "public" [/code[ Now reload your web site and prepared to be amazed. Assuming your results are similar to mine you should be floored right now. My load time went from 16 seconds to just 2 seconds! I added ETags with expires headers and found no difference. Because I found no difference, I decided to remove the Expires headers and just add the ETags. To configure ETags, again in your .htaccess file, add the following line: FileETag MTime Size



Save your file and reload your web site. You should have seen a significant improvement, but if your results were similar to mine, they weren't as good as expires header. My load time went from 16 seconds to a respectable 5 seconds.



That's all I have to share for this article. If you've found it useful, but would like more information on each of the 13 steps YSlow offers excellent descriptions of each.



Until next time.