By default, zip code validator would load after your Shopify page is fully loaded. So if your Shopify page takes takes 3 seconds to load, validator would start loading after that because of the way third party apps work on Shopify.
Most stores load super fast but if you have many app integrations and elements on a page, you might see page delays which would ultimately affect load time for zip code validator. If you would like to improve this delay, please take following steps.
This tutorial requires you to update a theme file for your store so please be careful when you update this.
Step 1: Visit "Online Store" > "Themes" > "Edit code"
Step 2: Go to "Layout" > "theme.liquid". If you can't find this file, please contact our support and we are more than happy to make this change for you.
Step 3: Copy following code & replace abc.myshopify.com with your Shopify Domain name. Note that it needs to end with myshopify.com.
Once changed, paste code into "theme.liquid" just before </head> tag.
<script id="rbz-theme-header-js" src="https://restrict-by-zipcode.herokuapp.com/public/script-tags/zipcode-restriction.min.js?shop=abc.myshopify.com" async="async"></script>
Step 4: Click "Save".
Now moving forward, zip code validator would load along with other parts of your page rather loading after entire page is loaded. You should see decrease in load time for a validator immediately.
Step 5: Go to our App > Global Settings > Scroll all the way down to "Dynamic Script Embed" section.
Click "Deactivate" which would remove dynamically embedded script from your store. As you've added a script directly in header, we don't need this now.
Visit your store and confirm that validator is still loading. If it doesn't then that means you've made some mistake at step #3. You can click on "Activate" tab again which would install a fall back mechanism and you should start seeing validator again.
Go to your Shopify store and you should see increase in load time for zip code validator. If you are still seeing delays, please contact our support and we are more than happy to take a further look.
Note: When you delete our app, it's recommended to remove line of code you added in theme.liquid so you wouldn't waste any resources :)