Closed Bug 144795 Opened 18 years ago Closed 1 year ago
.cookie for all documents
47 bytes, text/x-phabricator-request
|Details | Review|
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.
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
If you really want this, then you should mark it as a request-for-enhancement.
> 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.
Assignee: hyatt → general
Component: XP Toolkit/Widgets: XUL → DOM: Level 0
Priority: -- → P4
QA Contact: shrir → ian
Target Milestone: --- → mozilla1.9alpha
Created http://developer.mozilla.org/en/docs/Remote_XUL to list these kinds of problems.
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
Summary: support document.cookie from xul pages → support document.cookie from all documents
Summary: support document.cookie from all documents → support document.cookie for all documents
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/ee03e8a4f6cd Move HTMLDocument.cookie getter/setter to Document; r=bzbarsky
You need to log in before you can comment on or make changes to this bug.