Thanks to visit codestin.com
Credit goes to github.com

Skip to content

window.sessionStorage throws an exception when cookies are disabled in some browsers #359

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

Merged
2 commits merged into from
Dec 4, 2013

Conversation

labaneilers
Copy link
Contributor

Bug: Accessing window.sessionStorage throws an exception in some browsers (including Chrome) when cookies/localStorage are explicitly disabled. This causes history.js to completely die because one of the very first things it does is to check sessionStorage availability outside of a try/catch.

To reproduce:

  1. In Chrome, disable cookies.
  2. Hit any page with history.js
  3. Note that an exception is thrown when accessing window.sessionStorage

@labaneilers
Copy link
Contributor Author

I just realized my fix is practically identical to startswithaj's (should have checked the pull requests first- d'oh), except that I ran buildr afterwards and updated the compressed and uncompressed bundles.

ghost pushed a commit that referenced this pull request Dec 4, 2013
window.sessionStorage throws an exception when cookies are disabled in some browsers
@ghost ghost merged commit 452d495 into browserstate:master Dec 4, 2013
@ghost
Copy link

ghost commented Dec 4, 2013

Thank you!

This pull request was closed.
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.

2 participants