Categories
CMS Magento Mastering Development

How to add the webp format in the mod_expires part of the .htaccess file?

I add this line but it is not taken into account because the browser inspector tells me that the cache is 2 days for webp images:

ExpiresByType image/webp "access plus 1 month"

I use Plesk with Varnish.

<IfModule mod_expires.c>

    ExpiresActive On
    ExpiresDefault "access plus 2 days"
    ExpiresByType image/jpg "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType image/webp "access plus 1 month"
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType text/css "access plus 1 month"
    ExpiresByType application/pdf "access plus 1 month"
    ExpiresByType text/x-javascript "access plus 1 month"
    ExpiresByType application/x-shockwave-flash "access plus 1 month"
    ExpiresByType image/x-icon "access plus 1 month"

</IfModule>

Leave a Reply

Your email address will not be published. Required fields are marked *