How to improve GTmetrix page speed score

You can improve your website performance by using following tips.

Enable gzip compression

Enable gzip compression is probably the most important issue when improving speed and page speed score. Most hosting servers already enable this for you, but if you still see a warning about gzip in GTmetrix.

Add the code from this link to your .htaccess file.


# BEGIN Gzip
  mod_gzip_on Yes
  mod_gzip_dechunk Yes
  mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
  mod_gzip_item_include handler ^cgi-script$
  mod_gzip_item_include mime ^text/.*
  mod_gzip_item_include mime ^application/x-javascript.*
  mod_gzip_item_exclude mime ^image/.*
  mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
# END Gzip 

Leverage browser caching

Leverage browser caching generally means that you can specify how long web browsers should keep images, CSS and JS stored locally. That way the user’s browser will download less data while navigating through your pages, which will improve the loading speed of your website. 

Add the code from this link to your .htaccess file.


# BEGIN EXPIRES CACHING
ExpiresActive On
ExpiresByType text/html "access 1 month"
ExpiresByType text/css "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType text/javascript "access 1 month"
ExpiresByType application/javascript "access 1 month" 
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/xhtml+xml "access 1 month"
ExpiresByType application/pdf "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/svg+xml "access 1 year"
ExpiresByType image/x-icon "access 1 year"
ExpiresByType image/ico "access 1 year"
ExpiresDefault "access 1 month"

# Cache the following content for 1 year
<FilesMatch "\.(jpg|jpeg|png|gif|ico)$">
Header set Cache-Control "max-age=31536000, public"
# END EXPIRES CACHING

Optimise images

Every image you have on your site should be compressed! It can be done manually using imaging software, but it is much easier to install a WordPress plugin that can compress every image you have, and it will compress every image you upload to your site from now on.

I recommend using the TinyPNG for PNG and JPEG compression.

 

  • 4 Users Found This Useful
Was this answer helpful?

Related Articles

 Customisation of Croster sections

If you wish to customise any of the section, we recommend using Overwrites. The section tpl files...

 Custom Payment Gateway logos

By default, the Croster includes logos for these payment gateways: "Credit Card", "Stripe",...

 Friendly SEO URLs Troubleshooting

If you are using LiteSpeed server, you have to be aware that this type of servers require server...

 How to upgrade Croster WHMCS Theme

Make a Full Backup - We cannot stress enough how important it is to *always* take a full backup...

 Installing Croster WHMCS Theme

Make a Full Backup - We cannot stress enough how important it is to *always* take a full backup...