Open
Bug 1350812
Opened 8 years ago
Updated 2 years ago
Show origin of a cookie in the Storage Inspector
Categories
(DevTools :: Storage Inspector, enhancement, P2)
Tracking
(Not tracked)
NEW
People
(Reporter: sebo, Unassigned)
References
(Blocks 1 open bug)
Details
There are different ways to set cookies, via network requests or JavaScript. For web developers it may not be obvious, where a cookie came from.
Therefore there should be a column within the cookies list indicating the source of the cookie similar to the 'Cause' column for network requests.
This column would then either contain a reference to the network request or the JavaScript source (if possible with line and column numbers) that set the cookie. In case the network request is not listed (anymore) within the Network Monitor, the column should at least contain the URL of the request.
Sebastian
We *may* be able to get some information about the origin from the storage inspector but we will have to investigate that.
Whiteboard: [todo-mr]
Priority: -- → P2
Filter on HOTFROG.
Whiteboard: [todo-mr] → [todo-mr][t1]
I have taken some time to investigate this and there doesn't appear to be any way to find out whether a cookie came from a network request or whether it was set by JavaScript.
@Jason Is there any way we can tell if a cookie has been created using JavaScript or via a network a network request? In our devtools it would be great to have a way to find out.
Has Regression Range: --- → irrelevant
Has STR: --- → irrelevant
Flags: needinfo?(jduell.mcbugs)
OS: Unspecified → All
Hardware: Unspecified → All
Whiteboard: [todo-mr][t1]
Comment 4•7 years ago
|
||
Nick, I should know this but I don't--can you look into it? Sounds like we might need to export this info to XPCOM
Flags: needinfo?(jduell.mcbugs) → needinfo?(hurley)
Looks like the closest thing we have (which is totally not what we want, btw, so don't be fooled) is nsICookie2::isHttpOnly (which could definitely be taken as a sign that it was set via http if it's true, but it being false tells us nothing about the source).
Doesn't look like we store the source info in the cookie itself, so we'd have to plumb that through (and properly serialize it to disk, and, and, and). That info is definitely available when set in the cookie manager (I've changed code based on that kind of thing before), so it's doable, but we'd have to be ok with old cookies not having source info until they get refreshed or removed & recreated. Probably not the end of the world.
Flags: needinfo?(hurley)
Reporter | ||
Comment 6•7 years ago
|
||
(In reply to Nicholas Hurley [:nwgh][:hurley] (also hurley@todesschaf.org) from comment #5)
> Doesn't look like we store the source info in the cookie itself, so we'd
> have to plumb that through (and properly serialize it to disk, and, and,
> and). That info is definitely available when set in the cookie manager (I've
> changed code based on that kind of thing before), so it's doable, but we'd
> have to be ok with old cookies not having source info until they get
> refreshed or removed & recreated. Probably not the end of the world.
Surely not. From a user point of view, this case might be handled by displaying something like "not available", or "unknown" with a tooltip explaining why.
Sebastian
Depends on: 1437057
I have created bug 1437057 for implementing this and set it to blocking.
Summary: Show origin of a cookie → Show origin of a cookie in the Storage Inspector
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•4 years ago
|
Blocks: 1672148
status-firefox55:
affected → ---
Reporter | ||
Updated•4 years ago
|
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•