0

Is there a way to set the TTL in Magento for certain resources, like CSS and/or JS files? If not, is there a way to set it in general, for all resources? I searched the net, but couldnt find much.

Thanks for your help! :)

user1856596
  • 7,027
  • 10
  • 41
  • 63

1 Answers1

1

Maybe you want to use the .htaccess file:

<IfModule mod_expires.c>

############################################
## Add default Expires header
## http://developer.yahoo.com/performance/rules.html#expires

    ExpiresDefault "access plus 1 year"

</IfModule>

Example:

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css "access plus 1 week"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
</IfModule>
Michael Leiss
  • 5,395
  • 3
  • 21
  • 27