I'm trying to implement local storage
for navigating by pages.
I have a web site with some pages, all in one folder.
In one page, I'm setting the local storage:
var myObject = { 'id': 1, 'price': 50.0, 'total': 3 };
localStorage.setItem('data', JSON.stringify(myObject));
While in the first page, I see the local storage with data- thats OK. But after navigating to the second page, I see that the local storage is empty while trying to read:
var localObject = localStorage.getItem('data');
Can't understand where is the problem.