question

ArneGarvander-7224 avatar image
0 Votes"
ArneGarvander-7224 asked ArneGarvander-7224 commented

Cookies and localStorage

A website may save cookies on my computer.
If I test a website in Edge, Chrome, and Firefox I may get different cookies. Is that true?

A website may save data in LocalStorage on my computer.

If I test a website in Edge, Chrome, and Firefox I may get different data in LocalStorage. Is that true?
If I close the Chrome and Firefox data in LocalStorage will persist. Is that true?
If I close Edge 101 data in LocalStorage will not persist. Is that a bug?

ms-edge
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

cooldadtx avatar image
0 Votes"
cooldadtx answered ArneGarvander-7224 commented

Each browser has their own local storage independent of the others.
If you close the browser and it stored data in local storage then that data should be persisted across browser restarts.
I have seen in this forum in the last week someone say that a website they use is using local storage and Edge isn't persisting it. The recommendation was to report the issue to MS and provide them repo steps so they can identify what is wrong.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Any cookies to share?

0 Votes 0 ·
cooldadtx avatar image cooldadtx ArneGarvander-7224 ·

No. Cookies are tied to the site that generated them and per user/per browser. The only way to access a cookie from another browser (assuming you could even find it given that cookies are stored in a user's temporary cache somewhere) would be to have a browser extension that did it. Of course this is beyond what a web app could do.

The "correct" solution to sharing data across browsers and sessions is to store the data on the server. This is often done for settings that user's may want to customize (such as the color theme to use for the site). Server side storage is the only option.

0 Votes 0 ·

I have no need to share cookies.
I am just sharing some knowledge.

0 Votes 0 ·