Skip to content
Tutorials Center
My learning

Topics

Lesson 23 of 36 ยท Application and Storage

The Application Panel at a Glance

A map of the Application panel: manifest, service workers, storage areas, cache, background services, how to clear site data and what quota means.

Web apps keep a surprising amount of data inside the browser: cookies, tokens, offline copies of pages, saved settings, drafts, a database of cached records. The Application panel is where DevTools lets you see and edit all of it. It is also where you inspect everything that makes a site installable and capable of working offline: the web app manifest and service workers.

This lesson is a map. You will learn what each section of the left sidebar is for, how much a site may store, and how to reset everything when you need a clean start. The following lessons go deep on cookies, storage APIs, service workers and memory.

The sidebar

Open DevTools and choose Application. If the tab is hidden, click the double arrow in the tab bar. The left sidebar has three groups.

Application

  • Manifest: reads manifest.webmanifest, shows name, icons, theme color, start URL and display mode, and reports installability problems.
  • Service workers: shows the registered worker, its status and update controls.
  • Storage: shows how much space the origin uses and a button to clear it.

Storage

  • Local storage and Session storage: simple key and value pairs of strings.
  • IndexedDB: a real object database with stores and indexes.
  • Cookies: per-domain cookies with security flags.
  • Private state tokens, Interest groups, Shared storage: newer privacy-related APIs, only relevant if you use them.
  • Cache storage: the Cache API, normally filled by service workers.

Background services

  • Back/forward cache: tests whether a page can be restored instantly when users press Back, and explains why not.
  • Background fetch, Background sync, Notifications, Payment handler, Periodic background sync, Push messaging, Reporting API: record events from these features so you can debug them.

Not every item appears on every site. Only features the page uses show data.

Everything is scoped by origin

Browsers isolate storage by origin: the combination of scheme, host and port. https://shop.example and http://shop.example:8080 are different origins and see different storage. A page at https://shop.example cannot read cookies from https://other.example. This is why the Application panel shows only the data for the site you inspect (plus, for cookies, the domains the page contacted).

The sample below models the idea with a tiny stand-in: a Map keyed by origin, so you can see why parsing the origin correctly matters.

JS Stand-in: storage is partitioned by origin

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Only the first lookup finds the value. Scheme, host and port all matter.

Storage quota and clearing data

In the Storage section you see a bar chart of how much space the origin uses, split by type (IndexedDB, cache storage, service workers, local storage), and an estimated quota. Browsers allow a site to use a share of the free disk space, in practice often many hundreds of megabytes to gigabytes, but under pressure they may evict data from sites that were not granted persistent storage. In code, navigator.storage.estimate() returns the same numbers.

The button Clear site data removes all selected kinds of data for the origin at once. Options include Including third-party cookies, and the list of checkboxes lets you keep, for example, cookies while deleting caches. Use it at the start of every test run for first-visit behavior, and whenever a stale service worker or cache makes you doubt the code you see.

Other related shortcuts: the Network panel's Disable cache checkbox only affects HTTP caching while DevTools is open, and in the Application panel's service worker view, Update on reload and Bypass for network are your friends (see the service workers lesson).

Editing data live

Almost everything is editable from the panel:

  • Double-click a value in Local storage or Cookies to change it, press Enter to save.
  • Right-click a row to delete it, or use the Delete key; the clear-all icon removes everything in that area.
  • Use the filter box to search by key or value.
  • Create a new row by double-clicking the empty row at the bottom.

This turns the panel into a powerful test tool: set a loggedIn flag, expire a cookie, corrupt a value and see how your code reacts without writing extra scripts. You can do the same from the Console with localStorage.setItem() or document.cookie.

Estimating how much you store

Strings in JavaScript are stored as UTF-16, roughly two bytes per character, and browsers cap Local storage at about five megabytes per origin. Here is a stand-in that estimates usage so you can see how quickly a few big values fill the space.

JS Stand-in: estimate local storage size

Press Run (or Ctrl + Enter) to see the console output here.

No output.

A single 50,000 character draft already costs about 100 KB. Big data belongs in IndexedDB, which has a much larger quota and does not block the main thread like the synchronous Local storage API does.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which two URLs share the same storage?

    Origin is scheme + host + port. Paths do not matter, so the third pair shares an origin.
  2. 2. Where do you find the button that deletes cookies, caches, IndexedDB and more for the site at once?

    The Storage section has Clear site data with checkboxes for each data type.
  3. 3. Which section tests whether a page can be restored instantly with the Back button?

    The Back/forward cache page runs a test and lists reasons that prevent restoring.
  4. 4. Why prefer IndexedDB over Local storage for large data?

    IndexedDB is asynchronous and has a much larger quota; Local storage is synchronous and limited to about 5 MB.

Summary

  • The Application panel covers the manifest, service workers, storage areas and background services.
  • Storage is partitioned by origin (scheme, host, port).
  • Clear site data resets an origin for clean first-visit tests; many values can be edited live.
  • Local storage is small and synchronous; use IndexedDB for large data.

Next: Cookies, Local Storage and Session Storage