Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JS error in Safari’s Private Browsing mode #399

Merged
merged 1 commit into from
Jun 13, 2017

Conversation

36degrees
Copy link
Contributor

Safari in Private Browsing mode sets a session storage quota of 0 which means that attempts to write to it result in a QuotaExceededError being thrown, breaking JavaScript on the rest of the page.

The existing code is flawed in that it sets prototypeWarning to true but tests for 'false', so the warning is already shown on every page anyway.

As such, this simplifies it to remove the use of session storage entirely.

Safari in Private Browsing mode sets a session storage quota of 0 which means that attempts to write to it result in a QuotaExceededError being thrown, breaking JavaScript on the rest of the page.

The existing code is flawed in that it sets `prototypeWarning` to true but tests for 'false', so the warning is already shown on every page anyway.

As such, this simplifies it to remove the use of session storage entirely.
@NickColley
Copy link
Contributor

LGTM 👍

@36degrees 36degrees merged commit ed08391 into master Jun 13, 2017
@36degrees 36degrees deleted the fix-safari-private-browsing branch June 13, 2017 13:40
@joelanman
Copy link
Contributor

thanks all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants