Google Pagespeed: Remove unused JavaScript to reduce bytes...

7 0 0

Hey everyone!

Does anyone know what's wrong with the unused javascript errors from google pagespeed insights?
I know is from one of my apps, and I need that one. But those who go back to cdn. etc, what are those?

Can anyone lead me into the right direction to solve this? Maybe someone on Fiverr that can help me with this problem?

Google page speed insights Error.Google page speed insights Error.


Thanks in advance everyone!



Shopify Partner
418 44 87

This is an accepted solution.

Hi @lnaturelstore 

CDN is 'content delivery network'.  If you look closely, pretty much anything that loads content on your site will have a cdn identifier. 

As long as you're still using Smile, and you still want the ability for your customers to login with facebook on your site, I don't see anything else listed that you should seek to get rid of.

7 0 0

So for google I need to find a workaround for this. So the content loads faster. Anyone tips on this topic?

21 2 11

This is an accepted solution.

Hey Lien,

The reason this is marked as "Unused Javascript" in Google Pagespeed Insights is because even though the whole script is downloaded (for example Jquery), only a few lines of code are used on that specific page you're testing.

If you try another page, you'll see a different number in the "Potential Savings" column.

You cannot / shouldn't fix this. Google Pagespeed Insights was made to gauge the speed of any website, and sure, if this was a simpler website they really should try to optimize their scripts. But you are on Shopify, and Shopify needs loads of scripts to function properly. Even if you don't use the entire script on every page.

If you're interested in optimizing other parts of your page speed, I wrote an entire case study about it here:

I hope this makes sense!