Merchant Stack Daily

Should Shopify app scripts use defer or async?

Use defer for most scripts. Use async only for independent third-party scripts where order does not matter. Either is better than a script that blocks the page.

What Shopify says

Shopify's performance guidance says to use defer on non-critical scripts and async only for independent third-party scripts where execution order does not matter.

How to apply it

List every script tag in theme.liquid. Anything that needs the page first, like a widget, gets defer. Standalone trackers can use async. If a script has no owner, remove it.

Source: Shopify, Theme performance best practices. Reviewed Sep 23, 2026.