A
A
Andrey Nikiforov2016-07-25 02:28:41
Google
Andrey Nikiforov, 2016-07-25 02:28:41

Is PageSpeed ​​Insights lying?

Actually there is a site servicealpha.ru https:
//developers.google.com/speed/pagespeed/insi
...
Google constantly swears at compression and caching, no matter what settings I set in .htaccess, no matter what totalcache and supercache I set, still swears...
the last wp stands, what's the problem, sir?

чуть-чуть .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>

a little bit of magic checkgzipcompression.com/?url=http%3A%2F%2Fservice...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Neocaridina, 2016-07-25
@Neocaridina

In the sense of lying? html is compressed, styles and scripts are not. Press f12 in your browser and see the headlines for yourself.
In general, your styles and scripts do not give anything, try like

AddType text/css .css
AddType text/javascript .js

And decide - mod_deflate or mod_gzip to use.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question