Help - Search - Members - Calendar
Full Version: HTML 5 Cookies and local storage
HTMLHelp Forums > Programming > Client-side Scripting
I used the localStorage command to store a cookie and retrieve a cookie. I noticed that I was able to retrieve the stored value when I stored the cookie and then pressed retrieve button. However, I was not able to do this when I stored it, closed the browser, and then tried to retrieve it. It acted like a session cookie or a temporary cookie was stored instead of a persistent cookie. How do I make the cookie into a permanent or persistent cookie?

Here are my functions:

unction storeMyName()
{var fname =document.getElementById('fname').value;
alert("Name Stored");

function getMyName()
{ alert(localStorage.getItem('firstname'));


I haven't used the HTML5 Local Storage yet, but you can read up about it here: .
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.