Quantcast
Channel: Which is the better option to use: localStorage(), window.localStorage(), or document.localStorage()? - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Felipe for Which is the better option to use: localStorage(),...

According to W3C standards, the correct is window.localStorage because the localStorage attribute is part of window object. And it is not a function, it is an attribute.Source:...

View Article



Which is the better option to use: localStorage(), window.localStorage(), or...

The question says it all. I realize that all options do work in up-to-date browsers, but what is the semantically best choice, and why?

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>