With Cache-Control headers, you can define which proxies can cache your site content, and also determine how long files can be cached. You can also force to check if the cache is having the most recent information.
Code:
# 720 weeks
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=290804000, public"
</FilesMatch>
# 3 DAYS
<FilesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=171800, public, must-revalidate"
</FilesMatch>
# 5 HOURS
<FilesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=9600, must-revalidate"
</FilesMatch>
The above code goes into your root .htaccess file
Bookmarks