If Photolock seems to load slowly on your page and you are noticing delays for locks to activate, there are couple things you can do to prevent it happening:

Enable Speed Optimization
Photolock has a speed optimization setting available under "Advanced" section. It is highly recommended to enable this setting to improve the user experience.

Speed Optimization Setting

Please note that once speed optimization is enabled, any changes in settings may take up to an hour to take effect.

Optimize Your Site Speed
To maximize the effectiveness of Photolock, we recommend optimizing your site to an effective load-time under 3 seconds.

The most common way to increase site speed is compressing digital assets and photography. You can use a free tool like www.tinyjpg.com to compress your images yourself and upload them to your online store or website.

If your site has a longer load time and image compression does not solve the problem, we suggest that you speak with a developer team or Shopify Expert (like Pasilobus) to optimize your pages.

Disable Asynchronous Loading
Photolock is loaded asynchronously, meaning that it loads after the rest of your page elements to ensure speed and not cause any conflict with any other apps on your store. For that reason, if your site's load time is longer than average, this may cause slight delays in Photolock actions.

While we always recommend optimizing your site for speed, if you are not able to do so, you can choose to disable asynchronous loading so Photolock will force to load before all your page elements and no delay will occur. To do so, you need to make a small change in your connector script.

Locate the connector script in your website, which should have been placed just before </head> tag, which looks something like this:

In Shopify the connector script can be found in theme.liquid file

<script type="text/javascript" src="https://app.photolock.io/lock.js?shop=www.myonlinestore.com" async defer></script>

You will want to remove "async defer" attributes from this script and it should look like this after:

<script type="text/javascript" src="https://app.photolock.io/lock.js?shop=www.myonlinestore.com"></script>

Save changes in your code editor, and that's all you need to do to disable asynchronous loading.
Was this article helpful?
Thank you!