A few weeks back I captured some notes about tuning page speed. Since then I’ve learned a few more things.
- We found out the hard way that compression doesn’t seem to work right with IE6. As unfortunate as it may be IE6 still accounts for something close to 10% of web traffic – more on my site. Paul Turner documented how to change httpd.conf in his blog so that IE6 users don’t get compression. I’m happy to see big companies like Salesforce.com and Google dropping ceasing to support it.
- One more thing to remember about working with compression is that it’s most effective on textual information like HTML, CSS, and JavaScript. Typically web-ready images and binary downloads have already been (or should have been) compressed. While the web server will happily try to compress these files there will be little benefit and it can slow down your webserver.
- Another tool that was recommended to me was the YUI Compressor which minifies JavaScript and CSS. Minification removes any unnecessary characters from code without breaking the functionality.
- One note I found interesting on the Yahoo performance blog is that they estimate that between 40% and 60% of all page views are done with an empty cache meaning that the primary strategy should be to keep all pages as light as possible. Everything else is a secondary strategy. The other obvious thing to be cautious about when working with caching is the potential for serving stale content. When properly implemented an HTTP 304:Not Modified status-code will be returned. With these caveats in mind we’ve experimented with various header configurations changes to improve cachability. Askapache.com has a number of suggestions that can be easily implemented in a httpd.conf or .htaccess file for adding cache-control headers and adding future expires headers for static files. For dynamic pages (PHP, ASPX) headers should be set manually.
- Finally, all of these strategies are focused on improving web-server to browser experience. There are a whole series of optimizations that can be done to get the content to the web-server including optimizing SQL queries using stored procedures or tools like memcache.
Advertisement