buy-button-js icon indicating copy to clipboard operation
buy-button-js copied to clipboard

Shopify components load much later than the rest of the page

Open dmo9 opened this issue 3 years ago • 1 comments

When loading a page, all the elements rendered by my own server load almost instantly but the shopify components take another 500-1000ms or so to show up. Toggling iframe and whether the javascript is served locally has no effect.

Does anyone have a work around for this? I'd prefer not to add a spinner

dmo9 avatar Jan 17 '22 04:01 dmo9

Hey there,

I suppose this is pretty much on purpose on the buy button script as it loads the shopify JS in a lazy fashion with creating a script on the fly. You can of course change this by implementing the script tag with the target as a normal script in the head or footer but be aware that this will influence your PageSpeed scorings as it then will be render blocking.

lucasjahn avatar Jan 24 '22 08:01 lucasjahn