ripeworks/local-storage-fallback

Safari does not preserve sessionStorage on url change.

Closed this issue · 2 comments

https://stackoverflow.com/questions/67890031/sessionstorage-in-safari-14-1-1-lost-if-i-edit-the-url-to-change-route-and-dont
TLDR; starting at least from Safari 14.1.1 and still in Safari 16, sessionStorage gets cleared on page reload when different url is entered. This only happens when developer tools are not open, but happens to all session storage keys not only manually enterred.

As far as this library is concerned, consider marking Safari or at least its specific versions as not supporting sessionStorage, e.g. return false from isSupported method

I see that this library is very simple at specific browsers and versions may actually be out of scope. I will implement needed check in my code. closing this issue.

what a strange bug! Would you be willing to post your fix back in this issue? Might be worth adding.