how to keep javascript global variable when redirect to another page
<p>Is it possible to keep my javascript global variables after redirected to anothor page(<strong>in the same domain</strong>)?</p>

<p>I know i can use html5 localStorage/sessionStorage or store it on the server session state(and pull it later) . but when using complex or more then a few global variable, i wonder if there another quick way to use...</p>

<p>for example:</p>

<pre><code>&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt; first page &lt;/title&gt;

      &lt;script type="text/javascript"&gt;
          var myGlobal="this is my global variable";
            ...
      &lt;/script&gt;
   &lt;/head&gt;
   &lt;body&gt;
        ...
       &lt;a href="secondPage.htm" ..&gt; to the second page&lt;/a&gt;
   &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>and in the secondPage.htm:</p>

<pre><code>&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt; second page &lt;/title&gt;

      &lt;script type="text/javascript"&gt;
          alert(myGlobal);    //I want it to be :  "this is my global variable";
            ...
      &lt;/script&gt;
   &lt;/head&gt;
   &lt;body&gt;
       ...
   &lt;/body&gt;
&lt;/html&gt;
</code></pre>
