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:
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:
#1 YEAR <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$"> Header set Cache-Control "max-age=29030400, public" #1 WEEK <FilesMatch "\.(jpg|jpeg|png|gif|swf|css|js|txt)$"> Header set Cache-Control "max-age=604800, public" #3 HOURS <FilesMatch "\.(xml|html)$"> Header set Cache-Control "max-age=10800"
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.
[end of transmission, stay tuned]
One thought on “Weblogs.us Site Speed Tips”
Thanks for posting these great tips John!
PS I came across this WordPress codex page which has a nice sample .htaccess compression section:
Comments are closed.