Notalib / LYT

m.e17.dk
GNU Lesser General Public License v3.0
10 stars 12 forks source link

Use simple object persistence if localstorage isn't available #697

Closed saebekassebil closed 8 years ago

saebekassebil commented 8 years ago

This is a possible fix for MS-1333, that a lot of users have experienced. Since private mode Safari (and maybe others) exposes localStorage, but doesn't persist anything in it, LYT was tricked into believing that it actually saved the users credentials.

Now if localStorage doesn't persist, we just save data in an object in a closure.

I've removed some "functionality" of the LYT.cache module - but this "functionality" is hopelessly outdated (no-one will ever experience a DATA_QUOTA_EXCEEDED fault with the minimal amount of data we're saving) - and the strategy of dealing with such an error was way too elaborate.

@m-abs @dfg-nota You should probably be aware of this limitation of localStorage - but I hope that you'll be using a module to abstract away these problems.