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
  • 8,522
  • 13
  • 64
  • 103

0 Answers0