Closed
Bug 144795
Opened 23 years ago
Closed 6 years ago
support document.cookie for all documents
Categories
(Core :: DOM: Core & HTML, enhancement, P4)
Tracking
()
RESOLVED
FIXED
mozilla68
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: ashshbhatt, Assigned: ehsan.akhgari)
References
()
Details
(4 keywords)
Attachments
(1 file)
document.cookie does not write the cookie when called from a xul page, It is
only available until the page is loaded. Press shift+ reload and the cookie is
not there any more. Also if you see the cookie manager while the page is loaded
and the cookie set it dosen't show the cookie.
Comment 1•23 years ago
|
||
Yes, there is no implementation of 'cookies' for xul content over http. Is
there a specific reason why this is (or will be) required?
Note that setting |document.cookie| in a xul document is just like setting
|document.anypropertyname|. i.e., it is just a property of the document, and
not a "magic" property that digests and stores the cookie. For example, if
you say document.cookie="foo=bar; expires=Thursday, 16-May-2002 23:00:00 GMT";
in an HTML document and then do 'alert(document.cookie);' the value returned is
just the name-value pair "foo=bar". In a xul document, the original string,
including expiration time, is returned
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•23 years ago
|
||
If you really want this, then you should mark it as a request-for-enhancement.
Comment 3•20 years ago
|
||
> Is there a specific reason why this is (or will be) required?
For the same reason why you want this in HTML.
I'm currently implementing a xul frontend for sitebar (http://sitebar.org) and
stumbeled over this bug.
For example does sitebar save the state of open nodes and the session in a
cookie which a can't access from the xul frontend, cause its unprivileged as it
was intended to be. I think its importent that xul should not have lesser
capabilities to access data then html does, otherwise it will not be used.
Updated•19 years ago
|
Assignee: hyatt → general
Component: XP Toolkit/Widgets: XUL → DOM: Level 0
Priority: -- → P4
QA Contact: shrir → ian
Target Milestone: --- → mozilla1.9alpha
Updated•19 years ago
|
Assignee: general → benjamin
Comment 5•18 years ago
|
||
I ran into this bug as well. My JavaScript code was not working and I just could not understand why document.cookie was not returning anything. I am really surprised that document.cookie is not supposed to work with XUL content. Most programmer will probably find this behavior surprising and inconvenient too.
Given that XUL is an alternative for writing rich web based applications, this is a major omission.
For now I guess I can embed a small iframe with HTML in it, but that is an ugly solution.
Comment 6•18 years ago
|
||
Created http://developer.mozilla.org/en/docs/Remote_XUL to list these kinds of problems.
Updated•18 years ago
|
Assignee: benjamin → nobody
QA Contact: ian → general
Comment 7•17 years ago
|
||
An alternative to cookies is to use globalStorage (Firefox 2.0 and later). Given that I don't expect anyone to put in the work to make cookies functional.
Severity: normal → enhancement
Summary: document.cookie does not write the cookie from a xul page → support document.cookie from xul pages
Assignee | ||
Comment 8•6 years ago
|
||
This wpt test is testing whether document.cookie is present on XML documents and is ignored there.
Blocks: wpt.fyi-firefox-fails
Summary: support document.cookie from xul pages → support document.cookie from all documents
Assignee | ||
Updated•6 years ago
|
Summary: support document.cookie from all documents → support document.cookie for all documents
Assignee | ||
Comment 9•6 years ago
|
||
(In reply to :Ehsan Akhgari from comment #8)
This wpt test is testing whether document.cookie is present on XML documents and is ignored there.
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Keywords: parity-chrome,
parity-safari
Assignee | ||
Comment 10•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → ehsan
Comment 11•6 years ago
|
||
On MDN, we state that all browsers have it already available at Document.cookie; we should probably clarify this.
Keywords: dev-doc-needed
Comment 12•6 years ago
|
||
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ee03e8a4f6cd
Move HTMLDocument.cookie getter/setter to Document; r=bzbarsky
Comment 13•6 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Keywords: site-compat
Comment 14•5 years ago
|
||
Documentation updates:
- A little cleanup work on the Document.cookie page
- Submitted BCD PR 4351
- Added a mention of this change to Firefox 68 for developers
Keywords: dev-doc-needed → dev-doc-complete
Updated•5 years ago
|
Target Milestone: mozilla1.9alpha1 → mozilla68
You need to log in
before you can comment on or make changes to this bug.
Description
•