News for hackers. Stuff that matters.
Re:LocalForage – A fast and simple storage library for JavaS... by lucideer on Tuesday January 17, 2017 @08:01PM (#13423111)
I think the reasons stated for not including this PR are pretty well thought out, and while your arguments on utility seem consistent and definitely make logical sense, they don't really reflect my own development experience.

This could be just personal preference, but it seems far more likely to me that my expectation when storing values in localStorage would not match Chrome's apparent silent fallback of not storing that value. I'd much prefer to handle the error case.

Re:LocalForage – A fast and simple storage library for JavaS... by paulddraper on Tuesday January 17, 2017 @10:32PM (#13423748)
localStorage can be cleared at any time anyway. This simply makes it happen on each page navigation.

IDK what you'd rather do in Chrome Incognito, Safari Private, Edge InPrivate, etc.

---

PS. If the OS registry entry for localStorage location is invalid or missing, IE will also throw an error.

Re:LocalForage – A fast and simple storage library for JavaS... by lucideer on Wednesday January 18, 2017 @03:49AM (#13424997)
What I would do in Incognito, etc. would depend on the website/app and use-case. The point was that handling that on a case by case basis makes more sense than the suggested silent (and I would say unexpected) behavioural change.
Re:LocalForage – A fast and simple storage library for JavaS... by AshleysBrain on Wednesday January 18, 2017 @08:41AM (#13426216)
I'd say that if the user is using a private browsing mode, they are explicitly indicating to the browser not to store anything, and they will know that will happen. It's the whole purpose of the feature, so I don't think it counts as "silently" doing anything. I don't think there's any reason to then potentially break web pages that (quite reasonably) expect storage APIs to work.
Re:LocalForage – A fast and simple storage library for JavaS... by paulddraper on Wednesday January 18, 2017 @11:21AM (#13427490)
Right. It's like "silently" removing session and non-session cookies when the windows closes. That's the whole point.