Skip to main content

JavaScript Storage & BOM

8 lessonsAbout 48 minutesAdvanced

This part of the JavaScript Tutorial runs from JavaScript localStorage through to JavaScript navigator Object. There are 8 lessons here, and working through them takes about 48 minutes at a steady pace.

It follows on from JavaScript Regular Expressions, so finish that first if you have not already — the examples below assume you are comfortable with it.

Each lesson below says what it covers before you open it. Read them in order the first time; afterwards this page works as a index you can jump back into when you need to check one thing.

  1. 1JavaScript localStoragelocalStorage saves data in the browser that survives closing the page.
  2. 2JavaScript sessionStoragesessionStorage behaves like localStorage but clears when the tab closes.
  3. 3JavaScript Storing ObjectsJSON.stringify and JSON.parse let you save objects and arrays in storage.
  4. 4JavaScript Storage EventsThe storage event fires in other tabs when localStorage changes.
  5. 5JavaScript window Objectwindow represents the browser tab and is the top of the global scope.
  6. 6JavaScript location Objectlocation describes the current URL and can be used to navigate to another page.
  7. 7JavaScript history Objecthistory controls the browser's back and forward navigation stack.
  8. 8JavaScript navigator Objectnavigator describes the browser and device running the page.