Post by Jassher » Tue Jan 15, 2019 1:57 am

I have open cart 2.1.0.2 and my site is jasshermagicshop.com

I need to fix gtmetrix error of defer javascript and enable keep alive option and leverage browsing cache. .
Please some one help me in that . please somebody tell me where to do that and how to do that and which code to use .
https://gtmetrix.com/reports/jasshermag ... m/g7FkeTtz

Newbie

Posts

Joined
Tue Jan 15, 2019 1:49 am

Post by cyclops12 » Sat Jan 19, 2019 1:22 am

Click on the recommendation links in gtmetrix, I.E "Enable Keep Alive", then click the "whats this mean" button.
Read through these and they will help you solve your problems

Active Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by victorj » Sun Jan 20, 2019 10:34 pm

Keep alive is a server setting done in apache conf file, so if on a vps or cloud where you control your server yourself you can change this, you can try to add this line to your htaccess file
<ifModule mod_headers.c> Header set Connection keep-alive </ifModule>
otherwise it has to be done by your hosting company.

defer javascript has to be done in your header.tpl file.
be very carefull, defer or async javascript can break functionality of your site.
defer or better async evry line if javascript one by one and test your entire site including total checkout before defer or async next line.

to defer or async just add defer or async in your javascript line just after <script

be carefull it can break your site, difference between defer and async, if defer breaks a function you can try to async if it works fine if it does not that line cant be defered.

Browser cache a set of rules added to your htaccess file so things are cached by a users browser.
there are tons of website with numerous exaples how to do that.
Wich lines to use depends on your theme, just add those rules until gt metrix tels you that all are applied.

although your best results will come from making your images the right size and optimizing them it will reduce your page load dramaticaly resulting in a much faster website and better user expirience.

Oh before i forget, before starting to tinker around with optimizing your site make sure you made a or even better 2 backups of your working site.
(it took me 6 month to collect all knowhow and get my site up to 96% and get it as fast as possible)

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Eigen productie en snelle levering.
https://123-deurrubbers.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland
Who is online

Users browsing this forum: No registered users and 68 guests