Closed Bug 1498393 Opened 6 years ago Closed 6 years ago

Local Storage not cleared after running localStorage.clear() on same page in different tab

Categories

(Core :: Storage: localStorage & sessionStorage, defect, P2)

62 Branch
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: ealmansi, Assigned: janv)

References

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0

Steps to reproduce:

1\ Open https://local-storage-test-a.glitch.me/ in two tabs (Tab1, Tab2)

2\ Execute `localStorage.setItem('hi', 'bye')` in Tab1. Verify changes are reflected in Tab2 by running `localStorage.getItem('hi')` (result should be "bye").

3\ Click "Go to B" in Tab1.

4\ Execute `localStorage.clear()` in Tab2.

5\ Click "Go to A" in Tab1.

6\ Execute `localStorage.getItem('hi')` in both tabs.



Actual results:

In one tab, the result is `"bye"`. In the other one, the result is `null`.


Expected results:

The result should be `null` in both pages since local storage was cleared in step 4.

By step 6, both tabs are loaded on the same page (same protocol, host and domain), so their `localStorage` objects should be in-sync. This is the behaviour I get when following the same steps on Chrome, as well.
Component: Untriaged → DOM: Web Storage
Product: Firefox → Core
Priority: -- → P2
Jan: can we confirm this?
Flags: needinfo?(jvarga)
Looking.
Yeah, I can reproduce it using the current LS implementation.
Fortunately, new LS implementation doesn't have this problem.
Assignee: nobody → jvarga
Status: UNCONFIRMED → ASSIGNED
Depends on: 1286798
Ever confirmed: true
Flags: needinfo?(jvarga)
good then I will mark this as wontfix as the new implementation will fix it.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.