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
Should I host my own Javascript {{ "javascript.js" | asset_url }} in my theme or is it better to use the javascript library cdn?
Solved! Go to the solution
This is an accepted solution.
I would load as many assets as you can in your own theme, that will cut down on the number of different 3rd party resources needed, this way your code loads directly from your site's server (Shopify CDNs).
If you want to dive into optimizing 3rd party scripts this is a good article: https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/loading-thi...
This is an accepted solution.
I would load as many assets as you can in your own theme, that will cut down on the number of different 3rd party resources needed, this way your code loads directly from your site's server (Shopify CDNs).
If you want to dive into optimizing 3rd party scripts this is a good article: https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/loading-thi...
Thank you for the reply