How to set a cookie for my Firefox addon?
function setCookie(name, value, expires, path, domain, secure) { document.cookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } setCookie("foo", "bar");
This simple js does not set cookies in the Firefox addon, but it works well on the web page.
source share