Scripttag : how to load defer

Highlighted
Tourist
12 0 1

I used scripttag to insert a js resource into storefront pages. The script tag is added to the page with "async" attribute. My question : Is it possible to load the scripttag with "defer" instead of "async"?

I dont see anything about this mentioned in the api page https://help.shopify.com/en/api/reference/online-store/scripttag

0 Likes
Community Manager
Community Manager
618 45 81

 

Hi @globalizeit,

 

The only option currently is Async, though it's something we've wanted to explore for a while now. Loading script tags with defer is not possible as it stands.

0 Likes