Answer the question
In order to leave comments, you need to log in
Why does the "Use browser cache" option remain in Google PageSpeed?
Hello, please tell me, I check the site in the Google PageSpeed service, specify caching in the .htaccess file
. The content is as follows:
# Cache-Control
<ifModule mod_headers.c>
# 30 дней
<filesMatch "\.(ico|pdf|flv|swf|webp|woff)$">
Header set Cache-Control "max-age=86400, public"
</filesMatch>
<filesMatch "\.(jpg|jpeg|png|gif)$">
Header set Cache-Control "max-age=86400, public"
</filesMatch>
# 30 дней
<filesMatch "\.(js)$">
Header set Cache-Control "max-age=86400, public"
</filesMatch>
<FilesMatch "\.(css)$">
Header set Cache-Control "max-age=86400, public"
</FilesMatch>
# 2 дня
<filesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=86400, public, must-revalidate"
</filesMatch>
# 1 день
<filesMatch "\.(html|htm|php)$">
Header set Cache-Control "max-age=86400, private, must-revalidate"
</filesMatch>
</ifModule>
Answer the question
In order to leave comments, you need to log in
Google still thinks the cache time is too short. I did not find information about how much time and for what types of files Google considers the norm, so try to set not 24 hours, but, say, a year. In theory it should help.
Yes, 86400 sec == 24 hours
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question