Answer the question
In order to leave comments, you need to log in
Why doesn't Browser caching work?
Hello. I tested my site (malto.matdev.ru) using Google Pagespeed. It tells you to cache images and other files. As far as I understand, for caching you need to write a few lines in .htaccess:
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 5 seconds"
ExpiresByType image/x-icon "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 216000 seconds"
ExpiresByType application/javascript "access plus 216000 seconds"
ExpiresByType application/x-javascript "access plus 216000 seconds"
ExpiresByType text/html "access plus 600 seconds"
ExpiresByType application/xhtml+xml "access plus 600 seconds"
</ifModule>
Answer the question
In order to leave comments, you need to log in
What could be causing this?Due to the fact that the module is not included, for example. Or because .htaccess processing is disabled in the server config. Or because you have nginx at all.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question