Closed Bug 186298 Opened 22 years ago Closed 22 years ago

Cookie does not work in application/xhtml+xml documents with JavaScript

Categories

(Core :: Networking: Cookies, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 111514

People

(Reporter: lena, Assigned: hjtoi-bugzilla)

References

()

Details

(Keywords: testcase)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021202
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021202

Assuming that I want to put/get cookies using document.cookie with Javascript.
If the given document is detected as text/html, it works correctly (making a
settings so as to ask before storing cookie, you can see what happen obviously).
On the other hand, the given document is detected as application/xhtml+xml, the
document.cookie does not work at all and I cannot put and/or get cookies.
This behavior is independent on the place of the document, that is, on the
webserver or in the local environment.

Reproducible: Always

Steps to Reproduce:
1. Go to "Preferences -> Privacy & Policies -> Cookies" and check "ask before
storing cookie."
2. go to the website of "http://www3.sppd.ne.jp/lena/test-cookie.xhtml or
.html"(writen in English)
3. Fill the forms and Press "Resister cookie"
3.

Actual Results:  
For "test-cookie.html"(text/html), you can see the dialogue for the confirmation.
On the other hand, for "test-cookie.xhtml"(application/xhtml+xml), nothing happens.

Expected Results:  
"document.cookie" in Javascript should work correctly, in both of HTML and XHTML
documents.
We use different code path for XML, I should investigate this.
Assignee: morse → heikki
confirming per testcase
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
There is simply no document.cookie on the DOMDocument interface... that lives 
on DOMHTMLDocument.

*** This bug has been marked as a duplicate of 111514 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.