I'm trying to store arrays in localStorage on the clients browser for easy access of the content after the page has loaded, the arrays are pulled from a database.
My problem is that I can only use the local storage once the page has reloaded and it has reflected on the client, similar to this problem HERE with cookies.
I can't seem to find a solution to this. Any help would be appreciated some code:
localStorage.setItem('owner', JSON.stringify(data));
var seat = JSON.parse(localStorage.getItem('owner'));