Created
June 10, 2012 22:35
-
-
Save MikeRogers0/2907558 to your computer and use it in GitHub Desktop.
Decrease loading times via .htaccess
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FileETag none # Turn off eTags | |
<IfModule mod_expires.c> # Check that the expires module has been installed | |
ExpiresActive On | |
ExpiresDefault "access plus 10 years" | |
ExpiresByType image/gif "access plus 10 years" | |
ExpiresByType image/jpeg "access plus 10 years" | |
ExpiresByType image/png "access plus 10 years" | |
ExpiresByType text/css "access plus 10 years" | |
ExpiresByType text/html "access plus 1 seconds" | |
ExpiresByType text/javascript "access plus 10 years" | |
ExpiresByType application/x-unknown-content-type "access plus 10 years" | |
ExpiresByType application/x-javascript "access plus 10 years" | |
</IfModule> | |
<IfModule mod_gzip.c> # check if gZip support has been installed | |
mod_gzip_on Yes | |
mod_gzip_dechunk Yes | |
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ | |
mod_gzip_item_include handler ^cgi-script$ | |
mod_gzip_item_include mime ^text.* | |
mod_gzip_item_include mime ^application/x-javascript.* | |
mod_gzip_item_exclude mime ^image.* | |
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment