dimanche 1 mars 2015

LocalStorage is null on staging server. IIS7

While leaving page idle for a long duration say 10-15 min., localstorage on the page shows 'null'.


My code is that


LocalStorageFunc function is calling on document ready.



function LocalStorageFunc(MenuTitle, LinkName) {
// alert('MenuTitle--' + MenuTitle + 'LinkName----' + LinkName);
localStorage.setItem("PageTitle", MenuTitle);
localStorage.setItem("PageName", LinkName);
}

$("#pageTitle").text(localStorage.getItem("PageName"));
$("#PageName").text(localStorage.getItem("PageTitle"));


I had not found any particular reason that why localStorage value is getting null for page name and page title. while I had never open page with multiple tab and also session does not expire for logged in user. Browser: chrome latest version. Thanks for any help.


Aucun commentaire:

Enregistrer un commentaire