Sub topic 9
Withdrawal, refusal and re-prompting
This chapter assumes you know the GDPR and UK GDPR consent conditions, how a banner collects choices, and how a consent record is stored. It covers what happens after the first choice: the visitor refuses, changes their mind, or is asked again.
Withdrawal must be as easy as giving consent
Article 7(3) GDPR, which UK GDPR repeats, says a person can withdraw consent at any time. It also says withdrawing must be as easy as giving consent. A site that accepts marketing cookies with one click but hides the opt-out in a policy page fails this test.
In practice you need three things:
- A persistent control on every page, such as a "Cookie settings" link in the footer, that reopens the preference centre.
- A preference centre that shows the visitor's current choices, so they can switch marketing off in one step.
- A real effect. Withdrawal must stop marketing scripts from running and must stop any further reading of marketing cookies.
Withdrawal does not make earlier processing unlawful. It applies from that point on.
Refusal must carry no penalty
A refusal is a valid answer, and the site must respect it. Valid consent has to be freely given, so refusing marketing cookies must not lock the visitor out of the content or service. A "cookie wall" that blocks access unless the visitor accepts marketing tracking is likely to be unlawful. Regulators have accepted a wall only in narrow cases.
Refusal also needs to be as easy as acceptance. If the first layer has an "Accept all" button, it needs an equally visible "Reject all" button.
Remembering the choice and re-prompting
Store the visitor's choice and do not ask again on every page. Asking repeatedly pressures people into accepting. This is a known dark pattern.
Regulators do not set one legal renewal period. Guidance sets expectations instead. The French CNIL recommends renewing consent after about six months. Many sites use six to twelve months. Pick a period, record it, and apply it the same way to refusals and acceptances.
Re-prompt earlier only when something material changes:
- You add a new marketing vendor or a new purpose.
- The banner or policy wording changes in a way that affects what the visitor agreed to.
- The stored choice is lost, for example when the visitor clears their cookies.
The bannerVersion and policyVersion fields in the consent record from the previous chapter make the second case easy to detect.
Making withdrawal work in code
Withdrawal needs more than updating a flag. Scripts that are already loaded keep running until the page reloads. Cookies they have set stay on the device until you delete them.
const consent = { marketing: false };
function clearMarketingCookies() {
const names = ['_fbp', '_gcl_au', 'ads_id'];
const host = location.hostname;
names.forEach((name) => {
document.cookie = `${name}=; Max-Age=0; path=/`;
document.cookie = `${name}=; Max-Age=0; path=/; domain=${host}`;
document.cookie = `${name}=; Max-Age=0; path=/; domain=.${host}`;
});
}
function onConsentChange(choices) {
const wasGranted = consent.marketing;
consent.marketing = choices.marketing === true;
if (wasGranted && !consent.marketing) {
clearMarketingCookies();
// Loaded scripts cannot be unloaded, so reload to stop them.
location.reload();
}
}Replace the cookie names with the ones your audit found. Cookies set by a third-party domain cannot be deleted from your page. For those, reloading without the script and calling the vendor's opt-out mechanism are the usual routes.
Common errors
| Error | Why it fails |
|---|---|
| Footer link only appears on the home page | Withdrawal is not available as easily as consent |
| Marketing cookies stay after the visitor switches off | Withdrawal has no real effect |
| Banner reappears on every visit after a refusal | Pressure to accept undermines free choice |
| Refusal is stored in a cookie that is then blocked | The choice is lost and the visitor is asked again |
Exercise
A visitor accepted marketing cookies eight months ago and your policy renews choices every twelve months. Today you add a new advertising vendor to the site. Should you re-prompt now, and what should you record?
Show answer
Yes. A new vendor and purpose is a material change, so the earlier consent does not cover it. Re-prompt before the new vendor's tags load, and record a new consent entry with the new timestamp, the updated banner and policy versions, and the visitor's choices. The twelve-month timer does not need to run out first.