The main question is: why the persistent cookies
I set via JavaScript
in a locally stored HTML
page in Firefox
are not loaded into document.cookie
property despite being correctly shown in storage after restarting the browser? I've tried setting path
to /
and exact file path
, SameSite
to all possible values
, HttpOnly
and Secure
are false
.
The additional question is: what exactly is the grave danger in allowing such local cookies, since I've seen some claims about this not working "for security reasons" during my research on the topic?
P.S.: Since I've asked a simple question (I hope so) right here, without sending you to browse half the Internet, please, please read the question carefully to make sure the question you are answering and the one I've asked you is the same, and give me the real answer here too, in plain text. If you need to quote an RFC or Firefox's source code here to do this, please do so.
P.P.S.: Please, spare me the revelations of file://
cookies being "unreliable", I did my homework. What I want to know is not what but why, and if there's any workaround besides localStorage (which is "unreliable" too). The whole thing seems so stupid that I have a feeling I'm missing something obvious, but I haven't found the explanation yet.