Skip to content

Instantly share code, notes, and snippets.

@encodes1
Created September 18, 2012 12:57
Show Gist options
  • Save encodes1/3742947 to your computer and use it in GitHub Desktop.
Save encodes1/3742947 to your computer and use it in GitHub Desktop.
.htaccess performace / speed tweaks
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
# Add far future headers
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|swf|css|js|png)$">
ExpiresActive on
ExpiresDefault "access plus 1 year"
</FilesMatch>
FileETag MTime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment