How to save append item, if we do page refresh in jquery? <p>i want to append few line of html and that's remains as same if we do page refresh</p> <p>how could i do that</p> <p>code is :</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"&gt; &lt;/script&gt; &lt;script&gt; $(document).ready(function () { $("#btn2").click(function () { $("ol").append("&lt;li&gt;Appended item&lt;/li&gt;"); }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;p&gt;This is another paragraph.&lt;/p&gt; &lt;ol&gt; &lt;li&gt;List item 1&lt;/li&gt; &lt;li&gt;List item 2&lt;/li&gt; &lt;li&gt;List item 3&lt;/li&gt; &lt;/ol&gt; &lt;button id="btn2"&gt;Append list item&lt;/button&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>