Reduce unused JavaScript

Topic summary

Goal: Reduce unused JavaScript in a Shopify store after moving to the Dawn 2.0 theme. Google Coverage flags an external script (cdn.hextom.com/js/ultimatesalesboost.js) tied to a sales-boost app. Screenshots show unused code (red) and slow load on product pages from countdown timer and payment badges.

Key finding: The flagged script is injected by the Hextom: Ultimate Sales Boost app, not native theme code.

Recommended actions:

  • Contact the app’s support to optimize, limit, or disable injected scripts/features affecting performance.
  • In Shopify: Online Store > Themes > Edit code > Assets to review theme JavaScript. Remove only truly unused files with caution; back up the theme first.
  • Optionally minify remaining JS to reduce size, then test the site for breakage.

Follow-up clarification: Files ending in .js are JavaScript; files ending in .css are stylesheets.

Outcome/status: No direct theme-folder location was identified for the Hextom script since it’s app-injected. The thread suggests working with the app provider and cautiously pruning/minifying theme JS, but a final resolution is not confirmed.

Summarized with AI on January 9. AI used: gpt-5.

Where inside the “edit theme code” should I find the folders to Reduce unused JavaScript??

For example, one of my errors (found from Google Coverage) is :

https://cdn.hextom.com/js
/ultimatesalesboost.js?shop=haussmanninc.myshopify.com

Now under the Source table, I can see the red lines which means I can remove the lines of code from the actual theme code.

So where exactly/ which folder should I go and remove that code based on the URL?

What steps should I follow to make the smooth so that other aspects of the site are not affected?

~

2 Likes

Hi @Gauresh_1

It looks like a script coming from an app. Can you check if you have an app something to do with boosting sales?

Hello,

Yes we have an app called Hextom: Ultimate Sales Boost

They add a sales countdown timer + payment badges to our product pages.

Also, I noticed that both of them are taking a significant amount of time to load up on the product page.

We recently switched our theme from supply to Dawn 2.0

Please advise!

Hello @Gauresh_1 ,

Greetings! I am Gina from the flareAI app helping Shopify merchants get $6Million+ in sales from Google Search, on autopilot.

For third-party app-related speed issues, it is better to check with the app support team only and ask for help.

However, to reduce unused JavaScript in your Shopify theme, you’ll need to access your theme’s code and locate the relevant JavaScript files.

Steps:

  1. From your Shopify admin dashboard, click “Online Store” > “Themes” > “Edit Code”

  2. In the left-hand panel, you’ll see a list of files and folders. Look for a folder named “Assets” and click to open it.

  3. Within the “Assets” folder, you should see a list of JavaScript files. Look for files that are not being used by your website and delete them. Be careful not to delete any files that are being used, as this can break your website’s functionality.

  4. You can also minify the remaining JavaScript files to reduce their size. To do this, you can use a JavaScript minifier. Copy the contents of each JavaScript file into the minifier and then paste the minified code back into the original file.

  5. Once you have made your changes, save the files and refresh your website to ensure that everything is still working properly.

Remember to always make a backup of your theme before making any changes to the code. This will ensure that you can easily restore your website if anything goes wrong.

Hope this helps

Gina

Hi!

Can I ask a follow-up question?

I am in the “Assets”-tab, wanting to minimize and remove unused javascript. But I am not entirely sure what is Javascript and not. Is there any tool or method for this?

I am not an expert but I think the ones ending with .js are javascript and the ones ending with .css are css.

For example cart.js or collage.css