HTML5 Local Storage

HTML5 Local Storage

Let’s discuss what HTML5 Local Storage is all about.

  • HTML5 Local Storage stores data with no time limit,
  • Data can be accessible at anytime and any windows/tabs (with some conditions like same domain and same browser) even if the browser is restarted.

<script>
    localStorage.variableName = "value";
    alert(localStorage.variableName);
    localStorage.removeItem("variableName");
    alert(localStorage.variableName);
</script>

Leave a Reply

Your email address will not be published. Required fields are marked *