System Design · Senior · Question 42 of 75
How can the frontend evaluate feature flags without UI flicker?
- ✓Correct answer: Evaluate flags on the server or edge and ship the result with the HTML
- 2Fetch flags on the client after render and re-render the page
- 3Keep flags in code and change them only with a new deploy
Explanation
Loading flags on the client causes a "flash" of the old variant and layout shifts. Server-side evaluation (or bootstrapping values into the HTML) gives a stable first render. Flags are cached and included in the page cache key.