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

Option to disable cookie fallback #244

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

scroach
Copy link

@scroach scroach commented Aug 4, 2015

I've added an option to disable the cookie fallback when LocalStorage fails.
I simply don't want to use Cookies in my project as they don't support the amount of data and I need the return values for error handling - which are not reliable when working with the cookie fallback:

  1. Cookie fallback only works when LocalStorage is completely unavailable (browser does not support it). If saving to Local Storage fails because it is full (5MB/10MB depending on browser) - the select won't go for the cookie value and return either null or the previous value from local storage.
  2. Error Handling/return values seem not to work with cookies! When saving large data to cookies the browser simply ignores it and the method returns true even if it failed! LocalStorage throws the exception which gets already catched.

@grevory
Copy link
Owner

grevory commented Mar 1, 2016

I like this feature. Currently it cannot be merged in and it is failing the tests.

Can you:

  • Patch this PR so it can be merged into master
  • Patch this PR so it passes the tests
  • Write a test for disabling cookie fallback
  • Update the version number

Thanks!

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