1

Just wondwering, what is the correct cross browser use of localStorage. I have seen both, accessing localStorage through attributes as well as through getItem() and both seem to work. So what is better/correct?

localStorage["itemName"]

// or

localStorage.getItem("itemName");
Manuel
  • 9,112
  • 13
  • 70
  • 110

0 Answers0