The situation I have an index.html and in this file I have loaded content from subpages.
This my code in index.html
function getpage(page){
var pageSrc = 'content/'+page+'.html';
$('.content').load(pageSrc);
}
<a href="#" onClick="getpage('home')">Home</a>
<a href="#" onClick="getpage('about')">About</a>
<a href="#" onClick="getpage('contact')">Contact</a>
So,here, I want to create something like session or cookie using javascript/jquery method that can maintain the last page visited if users reloaded index.html page.The Important thing,the last page visited will be removed and back to normal index page when users cleared their browser cache or cookie.