Skip to content

Instantly share code, notes, and snippets.

@rioleo
Created October 27, 2011 19:00
Show Gist options
  • Save rioleo/1320490 to your computer and use it in GitHub Desktop.
Save rioleo/1320490 to your computer and use it in GitHub Desktop.
HTML5 Local Storage
<script>
if (!localStorage.pageCounter) { localStorage.setItem('pageCounter',0); }
localStorage.setItem('pageCounter',parseInt(localStorage.pageCounter)+1);
document.write(localStorage.pageCounter);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment