Shopify / buy-button-js

BuyButton.js is a highly customizable UI library for adding ecommerce functionality to any website.

Home Page:http://shopify.github.io/buy-button-js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shopify components load much later than the rest of the page

dmo9 opened this issue · comments

commented

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

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.