I am very new to using javascript and localstorage for HTML5. I am currently using PHP sessions on my site and want to switch to localstorage since I am currently using cookies to update sessions.
I understand that localstorage is a client function, not a server function, like PHP, so it’s hard for me to figure out how to do this.
All I want to do is set the localstorage values (which I have already done), but I need to be able to pass them back to PHP to restore them as SESSION variables (I have to do this since my site is over 100 pages or more 50 session variables at a time, so I would just use localstorage to regenerate session variables instead of cookies.
If someone can help me, it will be very appreciated. Thank.
source
share