Interview practice question
A cookie consent banner hurts LCP and CLS
Frontend Engineering · Web Performance · Intermediate
Your cookie consent banner becomes the LCP element and shifts content when it appears. How would you fix it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Render banner as overlay (fixed position).
- Load consent script efficiently; server-render banner.
- Avoid pushing content.
- Keep banner small/light.
- Measure impact.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.