Biotoxsin 4 Posted June 11, 2019 Report Share Posted June 11, 2019 Здравствуйте! Пробовал настроить кеш сайта через несколько способов: <filesMatch ".(css|js)$"> Header set Cache-Control "max-age=604800, public" </filesMatch> И <IfModule mod_headers.c> кэшировать html и htm файлы на один день <FilesMatch "\.(html|htm)$"> Header set Cache-Control "max-age=43200" </FilesMatch> кэшировать css, javascript на одну неделю <FilesMatch "\.(js|css)$"> Header set Cache-Control "max-age=604800" </FilesMatch> </IfModule> Но данные способы не работают. Проверял на сайте "redbot"(точка орг). На этом сайте мне выводит следующее: HTTP/1.1 200 OK Date: Tue, 11 Jun 2019 10:30:09 GMT Content-Type: text/html; charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive Keep-Alive: timeout=5 Vary: Accept-Encoding Server: Apache Set-Cookie: PHPSESSID=d1849e81c8ad102d58e70c6ee958e625; expires=Tue, 18-Jun-2019 10:30:09 GMT; Max-Age=604800; path=/; HttpOnly Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate Pragma: no-cache Вопрос, почему не работает? Может хостинг как-то препятствует настройке? Quote Link to post Share on other sites
ratgo 0 Posted June 11, 2019 Report Share Posted June 11, 2019 Смотрите на хостинг, возможно нужно настраивать кэширование в Nginx. Quote Link to post Share on other sites
Beauty 172 Posted June 11, 2019 Report Share Posted June 11, 2019 скорее всего у вас отключены некоторые настройки htaccess или нет установленных модулей например mod_headers Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.