Cache-control caching

Cache-Control header checker

Check usage of Cache-Control HTTP header on your site.


How to enable it in Apache

Add this to your .htaccess file (add file types if needed)

<filesMatch "\.(ico|gif|jpg|png|jpeg)$"> ExpiresActive On ExpiresDefault "access plus 11 month" Header append Cache-Control "public" </filesMatch>

How to enable it in Nginx

Add this to your virtual host config

location ~* ^.+\.(jpg|jpeg|gif|png|ico)$ { expires max; }

How to enable it in IIS

Use this in your IIS configuration file

<configuration> <system.webServer> <staticContent> <clientCache cacheControlMode="UseExpires" httpExpires="Tue, 19 Jan 2038 03:14:07 GMT" /> </staticContent> </system.webServer> </configuration>