If you login to a site while in "private browsing" mode on Safari (both iOS and OSX) all JS on the site will be broken, due to toolbar setting a localStorage setItem
, which is not supported in private browsing mode.
I see three options:
1) Change the localstorage to cookies (not sure if this will have same issue, needs to be explored).
2) introduce some sort of shim to avoid all the JS from breaking, like this one: https://gist.github.com/philfreo/68ea3cd980d72383c951
2) provide message letting the user know they cannot use the site logged in with private browsing mode on. (not ideal obviously)
for reference of the issue:
[Error] QuotaExceededError: DOM Exception 22: An attempt was made to add something to storage that exceeded the quota.
Comment | File | Size | Author |
---|---|---|---|
#13 | safari11privateLocalStorage.png | 198.86 KB | klara binon |
#10 | private mode.png | 253.44 KB | Jerenus |
Comments
Comment #2
nod_Had a looks seems like a design decision from the safari team.
Cookies are definitely not what we want as a replacement.
There would be several way of solving this, not sure which one is best yet.
Comment #3
Bcwald CreditAttribution: Bcwald commentedCan you list what ways you would potential solve this? Aside from moving away from local storage and doing something inside the JS code itself, I cant see any way to solve the problem of using LocalStoage other than a graceful degradation (at least, let the JS work outside of this).
Comment #4
droplet CreditAttribution: droplet commentedlightweight shim seems a must at the moment. Simply failover to let other scripts keep going.
Comment #6
effulgentsia CreditAttribution: effulgentsia at Acquia commentedPromoting to Major due to "breaking all JS on the site".
Comment #7
effulgentsia CreditAttribution: effulgentsia at Acquia commented#2696023-17: Save Users' Toolbar State config to serverside mentions this issue, so adding it as a related issue here. If folks here agree with that issue being the most desired way to solve this bug, I'd be fine with closing this as a duplicate, and changing that issue from a Normal feature request to a Major bug. Or, we can keep them as separate issues, if we want a quicker fix here than what that issue is proposing.
Comment #8
droplet CreditAttribution: droplet commented@effulgentsia,
It's not the same problems and should be separate issues.
Comment #10
Jerenus CreditAttribution: Jerenus as a volunteer commentedI got the same error message when I opened a clean website (D8 8.3.1) in Safari private window with logged in. Then the js of the tab switch (Looks like all js on the site) doesn't work.
Error Message:
QuotaExceededError (DOM Exception 22): The quota has been exceeded.
Screenshot:
Comment #11
cilefen CreditAttribution: cilefen as a volunteer commentedI removed the "Triaged D8 major" tag because that is not the correct tag following a triage session. @Jerenus comment #10 seems to be an ordinary comment rather than the results of a triage.
Comment #13
klara binon CreditAttribution: klara binon commentedI am working on triaging this issue at DrupalconVienna2017 following the instructions in #2474049: [meta] Major issue triage. @fgm is helping out as my mentor.
I cannot reproduce this in latest version of Safari, Version 11.0 (12604.1.38.1.7)
I do have local storage in private browsing, contrary to documentation up till now. These seem to be recent changes.
Comment #14
droplet CreditAttribution: droplet commentedComment #15
tim.plunkettThis was the correct status