Image Caching Test

This tool helps you check all images on your website are cached or not. It will check by what is the expiration time of the image stored in the cache.

By caching the image, the page load time can be reduced. Page load time is one of the factors in a search engine rankings to the your website.

How do cache all your image file?

You can set of the expires tag headers for your images. You can add the following lines into your .web.conf file:

location ~* \.(jpg|jpeg|gif|png|bmp)$ {
    try_files $uri $uri/ /index.php$is_args$args;

    add_header        Cache-Control public;
    add_header        Cache-Control must-revalidate;
    expires           7d;

If you using .htaccess file:

  ExpiresActive On
  ExpiresDefault "access plus 1 seconds"
  ExpiresByType image/gif "access plus 2592000 seconds"
  ExpiresByType image/jpeg "access plus 2592000 seconds"
  ExpiresByType image/png "access plus 2592000 seconds"

This script will only work if you have mod_expires and mod_headers enabled in Apache