3 ms·
Why does the browser pretend to have localstorage but then throw an exception when it's used? Surely it would be better to simply pretend to not support locals
by londons_explore 4y ago
Why does the browser pretend to have localstorage but then throw an exception when it's used?
Surely it would be better to simply pretend to not support localstorage and then all sites built with feature detection would work correctly without needing to special case this?
- wildrhythms 4y agoI can see it both ways. I think there's an opportunity for the developer to identify that localStorage is unavailable at runtime, and turn off certain features in the UI as a result, or write their own wrapper layer that does the 'throw-away' behavior.