All jobs / Frontend / web developer / Performance
Frontend / web developer interview question · 3–5 years
How do you keep marketing JS from growing without anyone noticing?
The strongest answer
CI bundle budgets and a PR report (source-map explorer) — fail the build on unexpected growth
Why it works
Budgets only work when they gate the merge. Vite being fast to compile is not the same as a small graph.
What a good answer covers
- Put a number on the JS.
- Budget in CI.
- Show the delta on the PR.
- Fail unexpected growth, then decide.
Answers that fall short
- Close, but not the strongest: Check the budget once a quarter
Quarterly is how a 30 KB helper becomes 300 KB. - Weak: No budget — Vite is fast enough
Tooling speed hides payload cost. - Red flag: Disable source maps so the number looks smaller
Hiding maps is not shrinking the bundle.
Who gets asked this
More Performance questions
- Ten thousand rows in a div and the tab dies. What do you do?
- A feature flag flips the hero after hydrate (flicker). How do you prevent it?
- An SSR page waits for user, then cart, then recommendations, sequentially. What's the issue and the fix?
- A content site with a few interactive widgets — full CSR SPA or islands / edge?
- Personalized HTML at the edge versus cache hit ratio — how do you decide?
- How does a frontend platform prove it is not making products slower?
- Images pop the page down as they load. What do you set and why?
- The main bundle includes an admin charts page most visitors never open. What do you do?