Weblogs.us Site Speed Tips

Weblogs.us supports two resource loading optimizations that can give your site a slight bump in performance. While neither are enabled by default on individual sites, we will be rolling them out over the next three months. However, you can try them out before they are rolled out to your site.

Compress with gzip

Weblogs.us supports on the fly content compression using mod_deflate. Most browsers support either gzip or DEFLATE encodings. Where some confusion comes in is that DEFLATE is an actual algorithm, while gzip is an encapsulation that uses DEFLATE for compression. To make matters worse, the RFC actually defines zlib as the encapsulation when ‘deflate’ is requested. While gzip is slightly slower than zlib (factor of 8% or less on the hardware we have at Weblogs.us, it is more reliable (thank Microsoft for that).

To enable gzip, just add the following to your .htaccess file:

AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/xhtml+xml application/xml application/rss+xml application/javascript application/x-javascript image/x-icon

This will add compression support for the major resources on a blog that are compressible (main HTML/XHTML document, CSS, Javascript, RSS feed, and favicon). By default, Weblogs.us will serve up gzip if both gzip and deflate are supported by the browser and the content type is added to the DEFLATE filter.

Use Cache-Control

As with compression, Weblogs.us supports cache-control but currently does not provide a default set of default rules for every site. An example set of cache-control rules that you can place in your .htaccess file:

<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
Header set Cache-Control "max-age=29030400, public"

<FilesMatch "\.(jpg|jpeg|png|gif|swf|css|js|txt)$">
Header set Cache-Control "max-age=604800, public"

<FilesMatch "\.(xml|html)$">
Header set Cache-Control "max-age=10800"

Future Improvements

Support for SPDY, Google’s lower latency protocol, will be added later this year, pending its stability and availability on Apache 2.4. As new technologies emerge we’ll evaluate and implement them as we see fit. This article was spurred by this post by JD Hodges, the owner of Weblogs.us.

-John Havlik

[end of transmission, stay tuned]

One thought on “Weblogs.us Site Speed Tips

Comments are closed.