squitcher
@squitcher
Верстальщик

PageSpeed Insights врёт?

Собственно есть сайтец
servicealpha.ru

https://developers.google.com/speed/pagespeed/insi...

гугл постоянно ругается на сжатие и кеширование, какие настройки бы я не выставлял в .htaccess, какие бы totalcache и supercache не ставил, всё равно ругается...

последняя wp стоит, в чем проблем-с ?

чуть-чуть .htaccess
Options +FollowSymLinks -Indexes

RewriteEngine On

# кеширование в браузере на стороне пользователя
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access 7 days"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
ExpiresByType text/html "access plus 7 day"
ExpiresByType text/x-javascript "access 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/x-icon "access 1 year"
ExpiresByType application/x-shockwave-flash "access 1 year"
</IfModule>

# Cache-Control
<ifModule mod_headers.c>
# 30 дней
<filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
# 30 дней
<filesMatch "\.(css|js)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
# 2 дня
<filesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=172800, public, must-revalidate"
</filesMatch>
# 1 день
<filesMatch "\.(html|htm|php)$">
Header set Cache-Control "max-age=172800, private, must-revalidate"
</filesMatch>
</ifModule>

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
<ifmodule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_item_include file \.js$
mod_gzip_item_include file \.css$ </ifmodule>
</IfModule>


чуть-чуть магии checkgzipcompression.com/?url=http%3A%2F%2Fservice...
  • Вопрос задан
  • 361 просмотр
Пригласить эксперта
Ответы на вопрос 1
Neocaridina
@Neocaridina
самый скромный
В смысле врет? html сжат, стили и скрипты нет. Нажмите f12 в браузере и сами смотрите заголовки.

У вас вообще стили и скрипты не отдают ничего, попробуйте типо
AddType text/css .css
AddType text/javascript .js


И определитесь - mod_deflate или mod_gzip юзать.
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы