Skip to content

[10.0] website_cookie_notice: cookie removed after closing browser #580

@oerp-odoo

Description

@oerp-odoo

Is it intended to clear cookies after browser is closed? To me it looks like a bug, but want to make sure if it is.

In JS part:

document.cookie = 'accepted_cookies=1; path=/';

If it is done like this, browser uses default to clear cookie after browser is closed. To make it stay, one must specify either expires or max-age attribute alongside. For example:

document.cookie = 'accepted_cookies=1; path=/; max-age=31536000';

Where in this example one year of age is specified. I could create PR, if this is a bug, if not, would be nice to get a reasoning why it was chosen to clear cookie after browser is closed (It should be annoying for user to get spammed with cookie notice when he already agreed/read it, every time he reopens browser and opens website).

Metadata

Metadata

Assignees

Labels

bugstalePR/Issue without recent activity, it'll be soon closed automatically.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions