how to save the state of a page after F5
<p>How can I save the state of a page after to press F5.(with php or javascript)</p>

<p>I have this page, which if I I press the button 1, div 1 disappears, and if you press the div 1 again, it reappears.
the button 2 has the same function.
is there any way that if I press button 1(or button2) disappears the div, and then if I press F5 continue the div1(or div2) hidden, ??</p>

<pre><code>&lt;input type="submit" id="button1" name="button1" value="ID1"&gt;&lt;br/&gt;

    &lt;div id="div1" name="div1"/&gt; 
    &lt;b&gt;Hello1&lt;/b&gt;&lt;br&gt;
    &lt;img src="pic1.png" height="100px" width="100px" /&gt; 
    &lt;/div&gt;
&lt;input type="submit" id="button2" name="button2" value="ID2"&gt;&lt;br/&gt;

    &lt;div id="div2" name="div2"/&gt; 
    &lt;b&gt;Hello2&lt;/b&gt;&lt;br&gt;
    &lt;img src="pic2.png" height="100px" width="100px" /&gt; 
    &lt;/div&gt;
&lt;script&gt;
 $(document).ready(function(){
        $("#button1").toggle(function(){
            $("#div1").hide();
        }, 
        function(){
            $("#div1").show();
        });
    });
    //
    $(document).ready(function(){
        $("#button2").toggle(function(){
            $("#div2").hide();
        }, 
        function(){
            $("#div2").show();
        });
    });
&lt;/script&gt;
</code></pre>

<p>Thanks in Advance</p>
