Improve the Frontend Experience

I played a little bit with yslow and tried to improve the end user experience a little bit (not that it was bad before .) ). The simplest way is to add some apache directives, which fixes some issues with compression and caching. Here's an example (the html pages itself are usually compressed by flux cms, so we don't need to use mod_deflate on them)

ExpiresActive On
ExpiresByType text/css "access plus 2 days"
ExpiresByType application/x-javascript "access plus 2 days"
ExpiresByType image/gif "access plus 2 days"
ExpiresByType image/jpeg "access plus 2 days"
ExpiresByType image/png "access plus 2 days" 

<Location /themes>
SetOutputFilter DEFLATE
FileETag none
</Location>

<Location /webinc>
SetOutputFilter DEFLATE
FileETag none
</Location>

<Location /files>
SetOutputFilter DEFLATE
FileETag none
</Location>

SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png|pdf)$ no-gzip dont-vary

That's the easy stuff, issues like versioning of scripts/css/images via URL (so you can set the Expire time as high as you want), putting the JS onto the end of the page and easy possibility to spread requests across multiple domains, need a little bit more work, but should find their way into Flux CMS soon.

PS. It's not done on this blog here yet, but eg. on http://blog.liip.ch/

Search

Navigation