The Reject Button Is the Product: Six Cookie Banners Worth Building
Photo: cookie consent banner laptop screen code web developer office, via vignette2.wikia.nocookie.net
We keep meeting the same cookie banner. It fills half the screen, has a bright Accept all and a grey Settings link, and uses a third-party script that weighs more than the page it is protecting. For UK studios, the question is not whether to have a banner. It is whether the banner does the job PECR and UK GDPR actually ask of it.
This is not legal advice. It is a practical teardown. The regulator's line is simple enough: non-essential cookies and similar tech need consent, consent must be freely given, specific, informed and unambiguous, and refusing must be as easy as accepting. The banner is the interface for that choice. If the interface is dishonest, the code underneath does not save you.
What the rules actually ask for
PECR covers cookies and similar technologies. UK GDPR covers personal data. In practice, a consent banner should not set analytics, advertising or preference cookies before the user chooses. It should explain what is being set and why, name the controller, and offer a clear reject route. Users should be able to change their mind later. Consent should be recorded, but recording consent does not mean hoarding data.
Pattern 1: The honest reject-all button
This is the baseline. Two buttons, same visual weight: Accept all and Reject all. A link to details. No pre-ticked boxes. The copy is plain.
We use cookies to understand how the site is used. You can accept all, reject all, or choose individually. Rejecting will not stop you using the site.
Code-wise, the banner should not load analytics until consent is stored. A small function reads a consent key and only then injects the script. If the user rejects, nothing non-essential loads. That is the whole trick.
Pattern 2: Equal prominence, not equal trickery
Equal prominence does not mean identical colours if your brand cannot manage it. It means the reject route is not hidden behind a grey link or a second screen. Put both actions in the first layer. If you use a settings panel, make the reject-all option visible there too.
Pattern 3: The analytics-poor default
If you only need anonymous, aggregated page views, consider not using analytics cookies at all. Server-side logs or a privacy-friendly tool that sets no cookies can remove the banner requirement for that slice of data. The default should be the least intrusive option that answers your question. Many studio sites need to know which pages get read, not which named person read them.
Pattern 4: Granular preferences without a vendor
A simple preferences panel can be three checkboxes: analytics, preferences, marketing. Each starts off. Save writes a JSON object to localStorage and sets a first-party cookie only if needed. The banner disappears. A footer link called Cookie settings reopens it. That is enough for most small sites.
const KEY = 'consent-v1';
function saveConsent(choice) {
localStorage.setItem(KEY, JSON.stringify(choice));
document.querySelector('#cookie-banner').hidden = true;
}
function loadAnalytics() {
const raw = localStorage.getItem(KEY);
if (!raw) return;
const choice = JSON.parse(raw);
if (choice.analytics) {
const s = document.createElement('script');
s.src = '/js/analytics.js';
document.head.appendChild(s);
}
}
Pattern 5: Remembered choice and easy withdrawal
Consent is not a one-off. Store the choice, show it in a settings link, and make withdrawal as easy as giving it. If someone clears their browser storage, the banner can return. That is acceptable. What is not acceptable is a banner that reappears every visit because the reject button does not actually persist.
Pattern 6: The no-banner banner
If your site sets no non-essential cookies, you may not need a consent banner at all. You might still want a short privacy notice explaining the essential cookies you do set. That is a different job. Do not add a banner just because everyone else has one. An unnecessary banner trains users to click accept without reading, which makes the whole ecosystem worse.
Why thirty lines can beat a platform
Third-party consent platforms can be useful for large estates with many scripts and legal teams. For a small UK studio site, they often add weight, complexity and a dashboard nobody checks. A first-party banner can be 30 lines of JavaScript, a small CSS block and honest copy. It is easier to audit, easier to remove and easier to explain to a client.
The test is simple: open the site in a fresh browser profile. Does anything non-essential load before you click? Can you reject as easily as accept? Can you change your mind? If the answer is yes to all three, the banner is probably doing its job. If not, no vendor logo will fix it.