Javascript Files

bobbymoore93
Tourist
9 0 2

Hi All,

On an SEO performance tool it's showing my shopify site has 6 javascript files and says I should reduce

Is there any easy way to look at which ones I don't need?

Thanks, 

Reply 1 (1)
JoesIdeas
Shopify Expert
1670 143 428

6 JavaScripts is a small amount so it's probably referencing something else.

If the tool is recommending you to combine the files into 1, that's outdated information, in fact combining files can actually make your site load slower (case study here: https://speedboostr.com/concatenation-case-study/).

In any case, to check to see if you have any extra scripts loading that shouldn't be, you'll want to do what we at Speed Boostr (Shopify optimization agency) call an App Analysis.

What you want to do is:

1) Look through your main theme files and see if there is any leftover code from apps you uninstalled. This is common because when you delete an app, Shopify immediately revokes access, so the app can't cleanup any code that it added to your theme. The main place you'll find old app code is theme.liquid and product.liquid (or it's sections / snippets).

2) Run your site through the Shopify Analyzer (that's a performance analysis tool my team built for the community, specifically for Shopify stores), then in the results, click on Number of requests and look in the "js requests" section to see the javascripts loaded on your page. If you notice scripts there that are from old apps, or that you don't need, hunt them down in the code and remove them.

3) In our full app analysis we also analyze slowest / heaviest loaders and look for errors, bottlenecks, and conditional loading opportunities, but for snuffing out extra files my points #1 and #2 is handle that.

Good luck on the investigation. If you find it too time consuming and want to hire an expert, feel free to reach out to speedboostr.com/contact. My team does stuff like this on a daily basis.

• Creator of Order Automator (automation app to save you and your team time on admin tasks)
• Shopify developer for +10 years
• Contributor on the Speed Boostr blog
• Guy who likes to help people