08.09.10 - Configure file cache from Apache
0 comments
Activate cache directives from Apache server can improve the loading perfornance
To enable items cache in the client side only, you only need to have installed on your Apache server the mod_expires module. Once installed, specify a default cache for all elements accessed by our server is as easy as typing the following directive in the httpd configuration of our site (.htaccess or httpd.conf):
* One month expiration since the access for all elements.
Probably, a better directive for heavy web elements like images, CSS's and JS's based on the filetype:
ExpiresActive On
ExpiresDefault "access plus 1 month"
ExpiresDefault "access plus 1 month"
Probably, a better directive for heavy web elements like images, CSS's and JS's based on the filetype:
ExpiresActive On
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 24 hours"
ExpiresByType text/javascript "access plus 24 hours"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 24 hours"
ExpiresByType text/javascript "access plus 24 hours"
More information: Apache
Comments
There are no comments jet. Be the first to comment!
