A
A
Alexander Konovalov2019-07-12 15:02:32
Server optimization
Alexander Konovalov, 2019-07-12 15:02:32

How to solve the cache problem?

Hello! How to set up the cache so that pagespeed does not swear? Site on wordpress
5d2876d475487054352389.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artem Gvozdev, 2019-07-12
@arty23_03

It's in .htaccess

SetEnvIf X-SSL-Emu on HTTPS=on
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
    AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
    AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
    <FilesMatch "\.(ttf|otf|eot|svg)$" >
        SetOutputFilter DEFLATE
    </FilesMatch>
</IfModule>
<ifModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 1536000 seconds"
    ExpiresByType image/x-icon "access plus 1536000 seconds"
    ExpiresByType image/jpeg "access plus 1536000 seconds"
    ExpiresByType image/png "access plus 1536000 seconds"
    ExpiresByType image/gif "access plus 1536000 seconds"
    ExpiresByType application/x-shockwave-flash "access plus 1536000 seconds"
    ExpiresByType text/css "access plus 1536000 seconds"
    ExpiresByType text/javascript "access plus 1536000 seconds"
    ExpiresByType application/javascript "access plus 1536000 seconds"
    ExpiresByType application/x-javascript "access plus 1536000 seconds"
    ExpiresByType text/html "access plus 1536000 seconds"
    ExpiresByType application/xhtml+xml "access plus 1536000 seconds"
</ifModule>

A
Anatoly, 2019-07-12
@Tolly

pagespeed says what he doesn't like and how to fix it!
Do you want to get the response Ctrl+C Ctrl+V?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question