Closed
Bug 1418961
Opened 8 years ago
Closed 8 years ago
Web Extension Unable to set cookies using "document.cookie = cName" in Firefox 57
Categories
(WebExtensions :: Untriaged, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: sandees, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20171115114231
Steps to reproduce:
create a simple web extension and in the background script write the below function to create a cookie.
function setCookie (cName) {
document.cookie = cName ;
}
This can also be confirmed by debugging extension and giving command document.cookie = "someName" ;
Actual results:
The cookie is not created.
Expected results:
The cookie should be created.
Updated•8 years ago
|
Component: Untriaged → WebExtensions: Untriaged
Product: Firefox → Toolkit
Comment 2•8 years ago
|
||
I don't understand what you are trying to do here, are you trying to set a cookie in the background script? What is the point of that?
(In reply to Andy McKay [:andym] from comment #2)
> I don't understand what you are trying to do here, are you trying to set a
> cookie in the background script? What is the point of that?
The web-extension sets/creates a cookie for the extension's background.html page. This cookie is used to store user preference/data.
(In reply to Andy McKay [:andym] from comment #2)
> I don't understand what you are trying to do here, are you trying to set a
> cookie in the background script? What is the point of that?
I am setting a cookie for extension's background page. starting FF 57, the cookie is not created using "document.cookie = " .
Comment 5•8 years ago
|
||
Whats the advantage of doing that over window.localStorage, browser.storage.local or indexedDB?
Comment 6•8 years ago
|
||
Cookies are only supported in HTTP documents.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
(In reply to Kris Maglione [:kmag] (long backlog; ping on IRC if you're blocked) from comment #6)
> Cookies are only supported in HTTP documents.
It was working fine till FF 55/56. We ported chrome extension that uses cookies and the web extension was working fine. It is not possible for us to update the extension and user storage APIs , we are affected by this break in FF.
Comment 8•8 years ago
|
||
I'm sorry that this used to work. That was, indeed, a bug.
Updated•7 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•