Works with a browser, except for svg-images

I'm having problems with browser-caching of SVG files.

In my .htaccess everything seems fine (at least it is pretty complete), but no matter what I try, it seems that the SVG images do not get into the browser cache.

there

<IfModule mod_expires.c>
    ExpiresActive On
    ...
    (various other file-types)
    ...
    ExpiresByType image/svg+xml "access plus 1 month"
    ExpiresDefault "access plus 1 month"
</IfModule>

in .htaccess, I tried

ExpiresByType image/svg+xml A2592000

too, but nothing works. I also tried changing the mime type to text / svg + xml. there is nothing good.

What can cause this failure?

thanks

+4
source share
1 answer

As per @Ariel's suggestion, I checked my .conf files and I have the same problem, although I added

ExpiresActive on
ExpiresDefault  "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType image/svg  "access plus 1 month"

() svg-. .htaccess, .conf.

    <FilesMatch "\.(jpg|png|css|js|swf)$">
     Header unset Cache-Control
    </FilesMatch>

, svg.

0

Source: https://habr.com/ru/post/1607899/


All Articles