Open Bug 1480046 Opened 6 years ago Updated 2 years ago

Add cookie creation and last modification date to the cookies API

Categories

(WebExtensions :: General, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: robwu, Unassigned)

References

Details

(Whiteboard: [design-decision-approved][dev-ux][cookie])

Firefox records the creation and last access time of cookies [1], but this is not available through the cookies API.

Adding these fields to the cookies.Cookie type would allow extensions/users to query cookies based on date (e.g. old cookies or recent cookies) and then modify or remove them.

This date-querying capability is currently supported in limited form via the browsingData API (the "since" parameter), but it seems be more generally useful to add the date-awareness to the cookies API, than to add specific fields to the browsingData API, as requested in the following bugs:

- Part of bug 1464895 - query the set of cookies that would be removed.
- Bug 1353726 - removing (recent) cookies in specific cookie stores.

[1] https://searchfox.org/mozilla-central/rev/196560b95f191b48ff7cba7c2ba9237bba6b5b6a/netwerk/cookie/nsICookie2.idl#51-64
Whiteboard: [design-decision-needed] → [design-decision-needed][dev-ux]
Priority: -- → P3
Whiteboard: [design-decision-needed][dev-ux] → [design-decision-approved][dev-ux][cookie]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.