Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
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, marking it as a solution, or donating here ☕.
Product Labels by BSS | B2B Solution & Custom Pricing
Need help from our expert? Kindly share your request with us via community@bsscommerce.com