G
G
Grisha Nikolsky2016-09-02 08:20:22
htaccess
Grisha Nikolsky, 2016-09-02 08:20:22

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>

Now this file is in the directory of this site, and Google Pagespeed produces all the same results. What could be causing this? Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2016-09-02
@alexey-m-ukolov

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 question

Ask a Question

731 491 924 answers to any question