Cookie Expiration
Last updated
Cookie expiration is the length of time a cookie stays on a visitor's device before the browser deletes it automatically.
A session cookie lasts only until the browser is closed. A persistent cookie has a set life, such as a day, a month or a year. Browsers and privacy rules limit how long some cookies can last, and visitors can delete them at any time.
Examples
- A login cookie that lasts until the browser closes.
- A cookie that remembers a language choice for a year.
- A tracking cookie that expires after thirty days.
Why it matters for your website
Keep lifetimes as short as the purpose needs, and say how long each lasts in your cookie policy. Shorter lives respect privacy and reduce risk.