reading-notes

This Repo required for Asac labs class 2


Project maintained by ManarAbdelkarim Hosted on GitHub Pages — Theme by mattgraham

THE PAST, PRESENT & FUTURE OF LOCAL STORAGE FOR WEB APPLICATIONS

For native applications, the operating system typically provides an abstraction layer for storing and retrieving application-specific data like preferences or runtime state. These values may be stored in the registry, INI files, XML files.

COOKIES:

Historically, web applications have had none of these luxuries. Cookies were invented early in the web’s history, and indeed they can be used for persistent local storage of small amounts of data. But they have three potentially dealbreaking downsides:

GOOD LOCAL STORAGE HAS:

A BRIEF HISTORY OF LOCAL STORAGE HACKS BEFORE HTML5:

dojo

INTRODUCING HTML5 STORAGE

what is HTML5 Storage?

it’s a way for web pages to store named key/value pairs locally, within the client web browser.Unlike all previous attempts at providing persistent local storage, it is implemented natively in web browsers, so it is available even when third-party browser plugins are not.the latest version of pretty much every browser supports HTML5 Storage… even Internet Explorer!

USING HTML5 STORAGE

setItem() & getItem() & removeItem():

TRACKING CHANGES TO THE HTML5 STORAGE AREA

The storage event is supported everywhere the localStorage object is supported,

      if (window.addEventListener) {
      window.addEventListener("storage", handle_storage, false);
      } else {
      window.attachEvent("onstorage", handle_storage);
      };

STORAGEEVENT OBJECT:

LIMITATIONS IN CURRENT BROWSERS

  1. “5 megabytes” is how much storage space each origin gets by default.

  2. “QUOTA_EXCEEDED_ERR” is the exception that will get thrown if you exceed your storage quota of 5 megabytes.

  3. browser doesn’t support any mechanism for web developers to request more storage space.