Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@PonySlaystation If a user doesn't allow cookies on a page ( and thus localstorage in general ), the localstorage object won't be accessible.
Either you check for it being there and react to it, or you insert a fake memory based one when it's not available. -
Do you find many sites breaking over this - or is it just that they thrown an uncaught exception when attempting to save to localStorage but keep functioning anyways and just re-fetch more data on subsequent requests since they can't find whatever was supposed to be stored?
-
@jiraTicket Quite a lot of sites break actually, often frameworks / libraries don't handle it ..
The best thing is, they usually first load the page, everything is fine for a second or two and then error out and display an error with something along the lines of 'Couldn't load the page' YEAH RIGHT!
Related Rants
The worst thing about cookies is that almost all pages forget / don't realize you have to handle cookie ( -> localstorage ) permissions!
rant
cookies
permission