Performance regressions · mid
Third-party scripts that freeze the page
Tags and widgets run on your main thread and change outside your deploys. You find them with RUM and traces, pause them quickly, and control how they load.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- Check what changed outside your deploys: tag manager versions and vendor script updates. Look at RUM INP and TBT by page, a Performance trace with third-party code marked, and Long Animation Frames attribution by script URL.
- Right now: pause the tag in the tag manager, or load it only after the user interacts or the page is idle.
- Prove it: block the script URL in DevTools (request blocking) and compare traces.
- Options: load after the load event, use a facade (a static chat button that loads the widget on click), run it in a worker (Partytown style), load only on pages that need it, and agree size and main-thread limits with the vendor.
- Twist: an unexpected redirect means the script may be compromised, as with polyfill.io in June 2024, when a new owner served malicious code to over 100,000 sites. Remove it at once and treat it as a security incident.
- Long term: self-host or pin versions with Subresource Integrity where possible, use a Content-Security-Policy allow-list, and review each new tag with a performance budget.
- Communicate: tell marketing the trade-off with numbers and security the supply-chain risk.
The red pen
Common traps: mistake → fix
Mistake: A tag manager change is not a release
Fix: it changes production code without your review.
Mistake: Async scripts cannot block the page
Fix: they still use the main thread when they run.
Mistake: A trusted vendor URL stays safe
Fix: ownership can change; pin versions and use integrity checks.
Easy to hard
Questions interviewers ask, easy to hard
- The page freezes for some users and nothing was deployed. What could it be?
- How do you prove a third-party script is the cause?
- How do you let marketing keep a chat widget without hurting INP?
- What happened with polyfill.io and what do you learn from it?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.