Persistent cookie
A persistent cookie carries an expiry date and stays in the browser until that date or until the user deletes it, so a site can recognize the browser across visits.A persistent cookie is set with an Expires date or a Max-Age in seconds. It survives the end of the session and is sent back on every later visit until it expires, which is how a site remembers your language, keeps you logged in for weeks, or lets an analytics tool count you as a returning visitor. Advertising identifiers are persistent cookies with long lifetimes.
Regulators limit those lifetimes. The CNIL's 2020 guidelines say trackers that require consent should live no longer than 13 months, and the data collected through them should be kept at most 25 months; its exemption for audience measurement has the same 13-month cap. Browsers add their own limits: Safari caps cookies set by scripts at 7 days, and sometimes 24 hours.
The consent choice itself is stored in a persistent cookie or in local storage, so the banner does not reappear on every page. That storage is exempt from consent because it exists to honor the visitor's choice. How long to keep it is a separate question from how long to keep the proof of consent on the server; see how long to keep consent records.