How to maintain and access javascript variable which is accesible from all the pages?
<p>I have a temp.js file containing global variable 'num' which is intially set to 0. It has a function Increment() which increments the num by 1.</p>

<p>I have 2 html files Page1.html and Page2.html. Both are referring to temp.js file (). Both the pages are having a button on click of which I call a javascript and navigate to the other page. i.e, on button click from Page1.html I navigate to Page2.html and vice versa.</p>

<p>Before navigating from any page, I call Increment() function. What I see is num is always intialized to 0 and Increment function sets it to 1. What I want is num be set to 0 for the very first time and later increment by 1 anytime I call the function.</p>

<p>Anyway that I can acheive the above. Passing the value using querystring or maintaining masterpage of some kind is ruled out in my scenario.</p>
