Muhammed Senussi
Muhammed Senussi
  • Muhammed Senussi
What a Third-Party Script Really CostsFrontend

Third-party scripts are added in a single line by someone who is not measured on performance, and removed by nobody.

The invisible costs

  • Main-thread time. A tag manager that loads six scripts can add hundreds of milliseconds of blocking time on a mid-range phone.
  • A connection to a new origin, with DNS, TLS and often a redirect before a single useful byte.
  • Whatever that vendor ships next week. You have granted execute permission on your users’ browsers, permanently and without review.

Practical discipline

Keep an inventory with an owner and a purpose for each entry, and review it twice a year — most lists have entries nobody can explain. Load anything non-essential after interaction, use a facade for embedded video and maps, and set a performance budget for third parties separately from your own code, because otherwise your team optimises its own bundle while the total gets worse.

1 Comments

  • Peter Bakker

    May 27, 2025

    The separate budget for third parties is a good idea. Ours are now larger than our application code and nobody noticed it happening.

Leave a comment