JS deferral

The Script Manager and JS deferral are crucial tools in SEO for organizing and selectively loading various scripts on your website, enhancing site speed and user experience

Who can use this feature?

  • This feature is available for Pro and Enterprise plan users.

What is script optimization?

Imagine that your stores do not only just have the basic features that came with the theme, but you also install a bunch of 3rd-party apps to enrich your store features and user experience. There would be some scenarios you may stumble upon:

  • You have many used apps and scripts that have been added long ago without noticing.

  • You are installing too many apps, which drag your site performance down due to running a lot of Javascript.

It's designed to enhance your store's performance and interactivity. Regarding the Core Web Vitals, you will be more familiar with Total Blocking Time.

As you may know, Javascript is single-threaded, throwing a bunch of Javascript code along with other tasks such as painting the site and downloading images, and contents would only make things worse. Why not let these 3rd -party app scripts such as chat, popup, floating widget, etc, take the back seats so that the most important task, the painting of the page to finished?

To rectify the situation, we defer 3rd party JS scripts, and unnecessary tracking scripts on first-user interaction by default to enhance the store's performance and interactivity. This approach will impact your store performance, especially on mobile devices since there are fewer big chunks of JS code for the device to run on the main thread. In addition, we have a list of apps that should take the back seats and which ones should not in order to ensure compatibility.

See our App Deferral for Shopify Store Speed Optimization deep dive post here to fully understand the idea behind this approach.

How does it work?

  1. In "Speed up customization" -> Click JS deferral

  2. Click Turn on

  3. Select a mode to optimize script: Standard, Smart, Expert

  4. Click Save

If you remove the app, Speed up will be disabled after 48 hours. Then the store's score will be affected and may drop suddenly.

Script manager

You can manually manage all scripts on your store by customizing the Script manager. This will let you configure each script behavior on your site.

For now, it will only manage your app script registered via Script Tag API, with OS 2 blocks, we are on the way to deliver this update SOON enough. With this update, customers will have more controls over the JS scripts on their website.

  1. In speed up customization, click Script manager

  2. Click Check for new scripts

  3. To all scripts, you can add or remove them from your pages. Click select Scripts and Pages your want to add/remove.

  4. Click Allow all/Prevent all to add or remove scripts on selected pages of your store

  5. Click Save

Last updated