How can I reduce unused Javascript to improve mobile speed?

How can I reduce unused Javascript to improve mobile speed?

thomasmrgn99
Pathfinder
104 0 34

Hi,

 

I am looking to improve my mobile speed score, I currently have 88 on desktop but 39 on mobile.

 

The page I am working on: https://pawcopets.co.uk/products/calming-dog-bed

 

I am working on the 'properly size images' side, but I cannot understand the 'Reduce unused JavaScript' 

 

Is it possible to remove any of the following scripts if they are not essential? 

Specifically I was wondering about this one from Facebook: https://connect.facebook.net/signals/config/287647222909118?v=2.9.92&r=stable

I have the facebook channel, is it linked to this?

 

Also the shopify ones

https://cdn.shopify.com/s/files/1/0568/1512/4688/t/32/assets/nt_vendor2.min.js?v=4242291862043312395...

https://cdn.shopify.com/shopifycloud/payment-sheet/assets/latest/b34f93ed7f63945a1055.dcc-442.en.js

 

There is also a line from afterpay, i do not even have/use this app. How and where can I remove this please?

 

Screenshot 2023-01-27 at 23.57.57.png

 

 

 

 

 

 

 

 

Any help is much appreciated

Thomas

Replies 4 (4)

kazi
Shopify Partner
630 91 114

Hello @thomasmrgn99  I have checked the page in google page speed https://pagespeed.web.dev/report?url=https%3A%2F%2Fpawcopets.co.uk%2Fproducts%2Fcalming-dog-bed&form...

 

dog.png

 

 

Mobile scores: 37

 

You can try to optimize following issues

 

Properly size images ( resize and convert them as webp)

> Reduce unused JavaScript ( Try inline them if available in theme files)

> Eliminate render-blocking resources (Inline css/js files)

> Reduce unused CSS (inline css files)

> Serve images in next-gen formats (convert the images to webp and reupload)

> Defer offscreen images (Add lazyload)

 

If you are unable to optimize them you can pick any shopify developer.

 

▶️ If you need more help with your Shopify store
Speed Optimization | Theme Customization ? ☎️ WhatsApp ✉️Email Skype: kof.bd

thomasmrgn99
Pathfinder
104 0 34

Hi @kazi, I also did the speed test on google so I also read everything that you copy/pasted off google. Which is why I asked in my message if anyone could help specifically with the japascript.

kazi
Shopify Partner
630 91 114

Hello @thomasmrgn99  you can hire any shopify developer you can find them here and there also in shopify expert https://experts.shopify.com/ 

▶️ If you need more help with your Shopify store
Speed Optimization | Theme Customization ? ☎️ WhatsApp ✉️Email Skype: kof.bd

oscprofessional
Shopify Partner
16115 2409 3123

@thomasmrgn99 

It is a third-party app for the Facebook app. It is the 3rd party js file, as you can not remove it. If you remove then the app may not work. 

 

Also, the other two js file cannot be removed. Are you using any app for payment sheets? or Shopify cloud. If yes then you cant remove it.

 

Work on these points :

  • Theme Upgrade if there is a scope and upgraded theme available
  • Reduce JS Payload.
  • Use Critical CSS.
  • Replace GIFs With Static Images
  • Reduce Large Image Sizes
  • Migrate Tracking Codes To Google Tag Manager
  • Compress Images
  • Limit Third-Party JavaScript & Shopify Apps
  • Preload Web Fonts. 
  • I suggest limiting it to one and using a standard web font.

 

https://www.oscprofessionals.com/blog/shopify-speed-optimization-guide/

If anything needs to be included or clarified then feel free to ask.  We will surely help you. 

Have a nice day!

 

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: [email protected] | 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