webzod
account

Reduce the JavaScript that blocks the page while it loads on Shopify

perf.cwv.tbt_needs_improvement · effort: about an hour

Why it matters

Total Blocking Time is a lab number that measures how long scripts keep the page from responding while it loads, and it is slightly above the threshold. Deferring scripts you do not need at once usually fixes it.

Staged change. Do this in stages and check each one before the next, so a mistake does not break your site or your mail.

The fix

  1. Remove apps you do not use, and delete leftover app code from the theme files (Online Store, Themes, Edit code), since an uninstalled app can leave its scripts behind. Each app that adds scripts to every page costs response time.
  2. Check the tracking and marketing scripts, including those added by tag managers and pixels, and remove those you do not use. Prefer theme features and Shopify's own blocks to apps for simple things such as sliders.
  3. Update the theme to the latest version, and choose a lighter one if a heavy theme is the cause. Shopify controls the server, so fix the page itself.

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.