Creating Cookies On File:/// Url - Evidence It Is Being Created But Not Showing In Document.cookie Or Cookie List In Chrome Dev Tools
I have some code that creates cookies. It creates two different user groups, checks for what group the users cookie is and does something based on it. The code is being developed
Solution 1:
Cookies are strictly a HTTP mechanism as per RFC 2109.
See this link, here, for the chrome "bug" report of this.
You can, however, run chrome with the flag --enable-file-cookies
to allow file:/// cookies
To run chrome with experimental / developer flags have a look here for instructions
It appears that the --enable-file-cookies
flag has been removed from all platforms that chrome runs on except Android.
You can read more about it here and here.
With this, it appears that there is no way to store cookies under a file:///
URL structure, The best way to go around this would be to run a small server locally when developing. Here's a good list of scripts that can run a local HTTP server from the command line. link
Post a Comment for "Creating Cookies On File:/// Url - Evidence It Is Being Created But Not Showing In Document.cookie Or Cookie List In Chrome Dev Tools"