Knowledgebase: How-To
Set Up Apache Cache Control
Posted by on 02 July 2012 11:09 AM
|
|
To implement cache-control with shared hosting, place the mod_expires directives in your .htaccess file. For example, if you have scripts located in '~/public_html/javascripts/', make a new .htaccess file in that directory with the following contents: ExpiresActive On ExpiresDefault "access plus 1 week"
<If Module mod_expires.c> >ExpiresActive On ExpiresDefault "access plus 1 week" </IfModule>
curl --dump-header headers https://www.mydomain.com/help/article/scripting-introduction-to-php Note: on servers with out Nginx Acceleration Stack, changes to expiry headers will be ignored and overwritten by Nginx.
Then check the output with cat headers. If you see Cache-Control: max-age=604800 then you're set (604800 is a week in seconds). The ASO Forums have a more detailed discussion of this. | |
|
Comments (0)