Frontend Masters Boost RSS Feed https://frontendmasters.com/blog Helping Your Journey to Senior Developer Thu, 05 Sep 2024 21:18:09 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.3 225069128 Third Party Scripts https://frontendmasters.com/blog/third-party-scripts/ https://frontendmasters.com/blog/third-party-scripts/#respond Thu, 05 Sep 2024 21:18:08 +0000 https://frontendmasters.com/blog/?p=3763 Almost every site has at least one third-party script on it, and the average is 5. I’ve taken that from the blog post Introducing Nuxt Scripts from Harlan Wilton. While third-party scripts are a performance and security drain, they are, as Harlan puts it “fundamentally useful and aren’t going anywhere soon.”

Typically, you just chuck a third-party script in the HTML somewhere with a <script> tag that is high enough up that any usage of it comes after. But these days, with JavaScript frameworks abound, loading and using them is far more complicated. I applaud Nuxt for taking this head on and providing sensible helpers for them. Loading triggers and callbacks, types, bundling, etc.

Looks like it’s on the roadmap, but getting Partytown in there to gets the scripts off the main thread would be very good.

]]>
https://frontendmasters.com/blog/third-party-scripts/feed/ 0 3763