E
E
Extramezz2016-01-05 12:14:01
Apache HTTP Server
Extramezz, 2016-01-05 12:14:01

Why is caching not working?

Good afternoon, the .htaccess file says:

<ifModule mod_headers.c>
    <FilesMatch "\.(flv|swf|ico|gif|jpg|jpeg|png|css|js|text|bmp|psd)$">
        Header set Cache-Control "max-age=172000"
    </FilesMatch>
    <FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi|html)$">
        Header unset Cache-Control
    </FilesMatch>
</IfModule>

<ifModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 5 seconds"
    ExpiresByType image/x-icon "access plus 172000 seconds"
    ExpiresByType image/jpeg "access plus 172000 seconds"
    ExpiresByType image/png "access plus 172000 seconds"
    ExpiresByType image/gif "access plus 172000 seconds"
    ExpiresByType application/x-shockwave-flash "access plus 172000 seconds"
    ExpiresByType text/css "access plus 172000 seconds"
    ExpiresByType text/javascript "access plus 172000 seconds"
    ExpiresByType application/javascript "access plus 172000 seconds"
    ExpiresByType application/x-javascript "access plus 172000 seconds"
</ifModule>

Everything is cached, but jpg, png pictures don’t want to go anywhere (as Gogle PageSpeed ​​says). Why?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vincent1, 2016-01-05
@Vincent1

Try adding

<IfModule mod_headers.c>
    Header append Cache-Control "public, no-transform"
</IfModule>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question