fbpx

Last Updated on May 19, 2020 by LAUNCHTIP

A quick and simple post. Remember to back up your theme and if you don’t fully understand this, we suggest contacting a Shopify Expert.

Async loading is usually something that is suggested with “increasing page speed”. You have most likely read a guide saying speed helps SEO, ran a speed check on your store and now you are working through the points. The first few were easy like compressing images and removing unwanted apps. The async one stopped you in your tracks.

This is because it requires thorough knowledge of the scripts your store is loading and then it also requires you to replace these with a snippet of code to load these asynchronously. If you do it incorrectly, you can cause your site to load incorrectly or not at all.

<span class="tag">The code:

<code><script</code></span><code> <span class="atn">src</span><span class="pun">=</span><span class="atv">"{{ 'example.js' | asset_url }}"</span> <span class="atn">async</span><span class="tag">></script></span></code>

This allows you to find all those snippets and replace “{{ ‘example.js’ | asset_url | script_tag }}” so that they load async.

Need to share?

Leave a Reply

Get the #1 Upsell App which has generated over $100m 💰 in Upsells!   Get App 🚀