DEV Community

Discussion on: Introducing Partytown 🎉: Run Third-Party Scripts From a Web Worker

Collapse
 
camaross profile image
Denis

I wonder how much better is this compared to delayed script injection? What I did before for the same purpose was pushing those 3rd party into the DOM, say, 1 sec after window's "load" event. That way, I saw no negative performance impact and the only downside was that a hit would not be captured by analytics if the user leaves the page too soon. Nevertheless, great technique!