Third Party code jquery.min.js causing fluctuating pagespeed scores.

GriffCat
Visitor
1 0 1

Hi all,

 

I have been working to increase my shop speed and have been using PageSpeed Insights to get an idea of what I need to work on. I have bit by bit making some progress, but I am getting frustrated tracking if my changes are actually even making a difference (or alas, making things worse!). When I run the test several times in a row I can at times get pretty different scores (plus or minus 10 points). 

 

It seems the big reason for this is in the "Reduce the impact of third-party code" section. I have noticed that one script in particular loads in with pretty drastically different speeds (from about 300ms to 800ms).  The script is coming from shopify and I'm just wondering what it is, if I can remove it somehow, or at least just curious why it loads fast sometimes but slow others? https://cdn.shopify.com/s/files/1/0584/4110/5576/t/10/assets/jquery.min.js?v=11586021193639794548165...

 

There might not be a solution for this, but at least I would like to wrap my head around why it is happening.

 

Thanks!

Reply 1 (1)

cristian_dev
Shopify Partner
14 2 2

Hi @GriffCat, Shopify itself doesn't need jQuery (an old and outdated JS library), but some of the apps you use might depend on it. 

 

jQuery is a JavaScript library which is often used by developers to implement some functionality. It used to be necessary to use jQuery in order to build things like animations but it's no longer needed with browser technology evolving so much and modern browsers having good built-in support for everything that jQuery was needed for.

 

If you want to remove it, you'd have to figure out what app needs it? Or maybe your theme?

 

The reason behind the speed fluctuation is because PageSpeed insights analyzes the page each time you load it. It could be the script is sometimes cached, sometimes isn't, it's a bit hard to see behind the scenes but fluctuations are normal.

 

Hope it helps. If you still have any questions drop me a message.

 

Thanks,

Cristian

 

 

 

 

 

Cristian B.