Instantly share code, notes, and snippets.

Embed
What would you like to do?
Points Brighton - Web performance improvements you can make in one hour. Supplementary code and links
# CACHING
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
ExpiresByType text/html "access plus 1 hour"
ExpiresByType text/richtext "access plus 1 hour"
ExpiresByType text/plain "access plus 1 hour"
ExpiresByType text/xml "access plus 1 hour"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"
</IfModule>
# GZIP COMPRESSION
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment