Possible Duplicate:
.htaccess and browser caching
There are a lot of snippets that enable caching on a website and I don't know which one should I use. The most popular is something like this:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresDefault "access 2 days"
</IfModule>
I also found something similar, but with keyword 'plus'. Like this:
ExpiresByType image/png "access plus 2592000 seconds"
What does it mean, because I didn't find anything in the documentation.
Another snippet I found:
<ifModule mod_headers.c>
<filesMatch "\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "max-age=604800, public"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "max-age=216000, private"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "max-age=600, private, must-revalidate"
</filesMatch>
</ifModule>
What is the best practice?