Storage Add

Storage Get

 

<script type="text/javascript">
if (Modernizr.localstorage) {
var visits = parseInt(localStorage.getItem("counter"));
visits ++;
localStorage.setItem("counter", visits);
}
</script>

 

tutorial