try to get the value of localStorage['test'] in the second tab.
Result:
The value is undefined.
Expected result:
The value is 1.
Tor Browser 9.0.1. Tested on onion sites with enabled js.
Please, please fix this, it is very important, I've developed an app that relies on this functionality and I didn't expect that there will such problems with localStorage. Please don't tell me that this behavior is intentional. It shouldn't be for the same origin.
Trac: Username: nDe15o
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
test 2: new identity, open in one tab and hit F5 (refresh) .. and after that result hit F5 again ... etc
test 3: new identity, open in one tab and hit Ctrl-F5 (hard refresh) .. keep testing it
test 4: new identity, open in one tab and hit the re-run buttom
** RESULTS**
test 1: 2 tabs: localStorage key and value is not found
test 2: 1 tab + F5: intermittent results
test 3: 1 tab + ctrl-F5: intermittent results
test 4: 1 tab + re-rerun button: localStorage key and value is found
I had this issue with sanitizing (in Firefox, portable) that started in FF62 (from memory, but I never picked up on it until FF68) and tested FF62 thru to current, literally a thousand plus tests over time especially in FF68+ (and I still test every day when I flick open various FF versions for other tests), and had quite a bit of an email thread with Johann Hofmann about it.
long story short: localStorage is a bit wonky (async arbitrary timing), and the fix that solved it all was to move to LSNG (dom.storage.next_gen)
aaaaaand... just to confirm it... doing test 1 (2 tabs)
Firefox (nightly)
LSNG = false, new pb window, LS does not persist across tabs
LSNG = true (default), new pb window, LS does persist across tabs
TB
LSNG = false (default), new id, LS does not persist across tabs
LSNG = true, new id, LS does persist across tabs
don't forget to change LSNG back to default
The thing is next_gen was not flipped on until FF70, and then they flipped it back in 70.0.1 due to issues that AFAIK shouldn't affect TB since it doesn't have persistent data.
I don't think LSNG = true would necessarily be ready for ESR68, but might be perfectly fine given TB's setup (PB mode etc). I'll ping Johann
FYI: testing in TB 8.5.5, the same issue exists: i.e test 1 (2 tabs), and obviously next_gen doesn't exist in ESR60. It's not a regression, LSNG is an enhancement, and people have been living with this "bug" in TB and Firefox for a long, long time. IMO, the only question is when does TB get LSNG: next ESR or earlier? :)
The thing is next_gen was not flipped on until FF70, and then they flipped it back in 70.0.1 due to issues that AFAIK shouldn't affect TB since it doesn't have persistent data.
I don't think LSNG = true would necessarily be ready for ESR68, but might be perfectly fine given TB's setup (PB mode etc). I'll ping Johann
OK, so Johann has replied, and said "I don't think I have any input on [this tor] ticket, let me know if you need me to forward it to folks who are actually working on LSNG
So I'll leave it up to you guys if we just wait until the next ESR, or if you want me to ask Johann to ask the right folks to let us know if it's OK to flip in Tor Browser
After reading through 1453699, LSNG is only enabled in Beta and Nightly at this moment. Unfortunately, I am not optimistic about this being available in 68ESR. I doubt Mozilla will backport the stabilized version to the ESR. We may be able to audit the version of LSNG that exists in 68ESR, but I don't know when we'll be able to do that. We'll likely wait until Mozilla believe LSNG is stable, at least.