Online store performance and site speed optimization
how do i change a tiktok script tag from async to defer. I can't seem to find where the code is and how to do it. many thanks.
Hi @SeanDS
To change the TikTok script tag from async
to defer
, you will need to modify the code in the HTML file of your website.
Here are the steps you can follow:
<script async src="https://www.tiktok.com/embed.js"></script>
async
attribute to defer
:<script defer src="https://www.tiktok.com/embed.js"></script>
That's it! By changing the async
attribute to defer
, you are telling the browser to load the TikTok script after the rest of the HTML content has loaded, which can improve the performance of your website.
Hope this helps you.
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
For B2B solutions and custom pricing, check out B2B Solution & Custom Pricing |
For adding product labels/badges, visit Product Labels by BSS
BSS Commerce - Shopify Apps & Store Development Service Provider
Hire a Shopify expert | Shopify Plus Store Development
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023