Answer the question
In order to leave comments, you need to log in
How to improve the PageSpeed of a site?
Hi all!
There is a site made on Wordpress, the site address is ecuras.com/. I'm currently trying to improve the PageSpeed for this site. The indicators are bad.
The htaccess file contains the following block:
# SET ON BROWSER-SIDE CACHE
<ifModule mod_headers.c>
<FilesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=43200"
</FilesMatch>
<FilesMatch "\.(js|css|txt)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
<FilesMatch "\.(flv|swf|ico|gif|jpg|jpeg|png)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>
<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
Header unset Cache-Control
</FilesMatch>
</IfModule>
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 5 seconds"
ExpiresByType image/x-icon "access plus 30 days"
ExpiresByType image/jpeg "access plus 30 days"
ExpiresByType image/png "access plus 30 days"
ExpiresByType image/gif "access plus 30 days"
ExpiresByType image/webp "access plus 30 days"
ExpiresByType application/x-shockwave-flash "access plus 30 days"
ExpiresByType text/css "access plus 30 days"
ExpiresByType text/javascript "access plus 30 days"
ExpiresByType application/javascript "access plus 30 days"
ExpiresByType application/x-javascript "access plus 30 days"
ExpiresByType text/html "access plus 12 hours"
ExpiresByType application/xhtml+xml "access plus 5 minutes"
ExpiresByType application/xml "access plus 5 minutes"
</ifModule>
Answer the question
In order to leave comments, you need to log in
The mod_headers.c, mod_expires.c modules may not be enabled on the hosting, that's why the cache does not work, you need to write to the hosting
The data for your site is taken from a third-party domain cdn.ecuras.com, so optimization must be done there too.
This applies to
1) Leverage browser caching. Copy the part of htaccess that deals with caching in htaccess on cdn.ecuras.com
2) Your images are not optimized. I have tried many online and offline utilities. I settled on TinyPNG for myself . It works with PNG, JPG files.
3) Reduce server response time. At this point, see which plugins can be disabled in WP. If possible, move to a more expensive hosting. But I don't think this point is critical.
This will help you more.
well, do not forget to install it yourself jpegoptim
It is installed from the repositories.
about 30 points will add
Try like this
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##
# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE image/png
AddOutputFilterByType DEFLATE image/gif
AddOutputFilterByType DEFLATE image/jpg
AddOutputFilterByType DEFLATE image/jpeg
AddOutputFilterByType DEFLATE image/vnd.microsoft.icon
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question