[Webkit-unassigned] [Bug 225344] New: localStorage changes aren't reflected between windows
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue May 4 01:05:29 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=225344
Bug ID: 225344
Summary: localStorage changes aren't reflected between windows
Product: WebKit
Version: Safari 14
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Blocker
Priority: P2
Component: DOM
Assignee: webkit-unassigned at lists.webkit.org
Reporter: jaffathecake at gmail.com
Using Safari 14.1 or later:
1. Tab A: Open https://static-misc-3.glitch.me/localstorage-bug/ in new tab
2. Tab A: Hit 'increment'
3. Tab B: Open https://static-misc-3.glitch.me/localstorage-bug/ in new tab - it displays '1' as expected
4. Tab B: Hit 'increment'
Tab A does not get a 'storage' event, clicking "Re-get value" returns the same value.
It seems like localStorage state is copied at some point, but it doesn't receive any updates after that. However, it's still writing to the underlying data store.
Refreshing the page still returns stale data.
This will result in data loss on websites, as two tabs will be writing to storage, unaware of each others' changes.
Additionally, the 'storage' event is used for cross-tab communication in Safari, since it doesn't support BroadcastChannel, and this bug breaks that. In fact, BroadcastChannel polyfills use the 'storage' event https://github.com/JSmith01/broadcastchannel-polyfill.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210504/92239a4b/attachment.htm>
More information about the webkit-unassigned
mailing list