How can we effectively minimize unused JS to improve website speed?

How can we effectively minimize unused JS to improve website speed?

thekennel
Visitor
1 0 0

Hi,

 

We are trying to improve our website www.thekennelco.co.uk and have looked at the Google Page Speed and get the errors below which need resolved. From what I can see, these are related to files which we cannot control - I am not sure if we have access to the vendors.js? 

 

Anyway, does anyone have any tips on how we can improve these metrics?

 

Screenshot 2022-01-19 at 09.11.04.png

Replies 2 (2)

oscprofessional
Shopify Partner
16115 2409 3123

Hi @thekennel ,

I have checked your store in page speed insight tool, yeah Its very low and low mobile page speed may kill your traffic and affect your conversion.

Use Async and defer method for JavaScript files.

Async – lets the HTML parser (e.g. a visitor’s browser) download the JavaScript while still parsing the rest of the HTML. That is, it doesn’t completely stop parsing while the file downloads. However, it will pause the HTML parser to execute the script once it downloads.

Defer – lets the HTML parser download the JavaScript while parsing the rest of the HTML and waits to execute the script until the HTML parsing is finished.

 

We cannot remove vendor.js as it require for shopify store.

Or defer them one by one and check if it messes with anything in your store. after adding defer, preview your store and see if everything works – things like your add to cart and popups.

 

Read this article. you will have an idea!

https://www.oscprofessionals.com/blog/how-to-minify-your-shopify-javascript-files/ 

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing | Oscp Upsell & Cross sell App : Free | Oscp Sales & Volume Discount App : Free | Custom Pricing Wholesale App : Free

oreoorbitz
Shopify Partner
260 31 132

You're loading the script for Google Tag manager 3 times, these are probably from third party monitoring services, I suggest you organize all your analytics and reduce all your tags into a single Tag manager container and only load one instance of the google tag manager script.

Available for pagespeed consulting
https://www.upwork.com/freelancers/~01a19b6cd90193f4f6?viewMode=1&s=1017484851352698949