<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>https://web.dev/</id>
  <title>Marc Cohen on web.dev</title>
  <updated>2026-04-15T23:21:06Z</updated>
  <author>
    <name>Marc Cohen</name>
  </author>
  <link href="https://web.dev/authors/mco/feed.xml" rel="self"/>
  <link href="https://web.dev/"/>
  <icon>https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/4VNx2OZc6ngQf50LNQz0.jpeg?auto=format</icon>
  <logo>https://web.dev/images/shared/rss-banner.png</logo>
  <subtitle>Eng Manager, Web Developer Relations</subtitle>
  
  
  <entry>
    <title>Web storage overview</title>
    <link href="https://web.dev/web-storage/"/>
    <updated>2016-09-28T00:00:00Z</updated>
    <id>https://web.dev/web-storage/</id>
    <content type="html" mode="escaped">&lt;p&gt;It’s important to choose the right storage mechanisms, both for local device
storage and for cloud based server storage. A good storage engine makes sure
your information is saved reliably, reduces bandwidth, and improves
responsiveness. The right storage caching strategy is a core building block for
enabling offline mobile web experiences.&lt;/p&gt;
&lt;p&gt;This article provides a brief foundation for evaluating storage APIs and
services, after which we’ll provide a comparison table and some general
guidance. In the near future, we plan to add resources for understanding
selected storage topics in greater depth.&lt;/p&gt;
&lt;h2 id=&quot;storage-taxonomy&quot;&gt;Storage Taxonomy &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/web-storage/#storage-taxonomy&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Let’s start by understanding some of the dimensions by which we can analyze data
storage for web apps. Later, we’ll use this framework to enumerate and evaluate
the many storage options available to web developers.&lt;/p&gt;
&lt;h3 id=&quot;data-model&quot;&gt;Data Model &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/web-storage/#data-model&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The model for storing units of data determines how data is organized internally,
which impacts ease of use, cost and performance of storage and retrieval
requests.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Structured:&lt;/strong&gt; Data stored in tables with predefined fields, as is typical
of SQL based database management systems, lends itself well to flexible and
dynamic queries, where the full range of query types may not be be known a
priori. A prominent example of a structured datastore in the
browser is IndexedDB.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Key/Value:&lt;/strong&gt; Key/Value datastores, and related NoSQL databases, offer the
ability to store and retrieve unstructured data indexed by a unique key.
Key/Value datastores are like hash tables in that they allow constant-time
access to indexed, opaque data. Prominent examples of key/value datastores are
the Cache API in the browser and Apache Cassandra on the server.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Byte Streams:&lt;/strong&gt; This simple model stores data as a variable length, opaque
string of bytes, leaving any form of internal organization to the application
layer. This model is particularly good for file systems and other hierarchically
organized blobs of data. Prominent examples of byte stream datastores include
file systems and cloud storage services.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;persistence&quot;&gt;Persistence &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/web-storage/#persistence&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Storage methods for web apps can be analyzed according to the scope over which
data is made persistent.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Session Persistence:&lt;/strong&gt; Data in this category is retained only as long as a
single web session or browser tab remains active. An example of a storage
mechanism with session persistence is the Session Storage API.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Device Persistence:&lt;/strong&gt; Data in this category is retained across sessions and
browser tabs/windows, within a particular device. An example of a storage
mechanism with device persistence is the Cache API.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Global Persistence:&lt;/strong&gt; Data in this category is retained across sessions and
devices. As such, it is the most robust form of data persistence. An example of
a storage mechanism with global persistence is Google Cloud Storage.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;browser-support&quot;&gt;Browser Support &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/web-storage/#browser-support&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Developers should choose an API best suited to their problem domain; however,
they should also take into account the fact that standardized and well
established APIs are preferable to custom or proprietary interfaces, because
they tend to be longer lived and more widely supported. They may also enjoy a
broader knowledge base and a richer developer ecosystem.&lt;/p&gt;
&lt;h3 id=&quot;transactions&quot;&gt;Transactions &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/web-storage/#transactions&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Often, it is important for a collection of related storage operations to
succeed or fail atomically. Database management systems have traditionally
supported this feature using the transaction model, where related updates may be
grouped into arbitrary units. While not always necessary, this is a convenient,
and sometimes essential, feature in some problem domains.&lt;/p&gt;
&lt;h3 id=&quot;syncasync&quot;&gt;Sync/Async &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/web-storage/#syncasync&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Some storage APIs are synchronous in the sense that storage or retrieval
requests block the currently active thread until the request is completed. This
is particularly onerous in web browsers, where the storage request is sharing
the main thread with the UI. For efficiency and performance reasons,
asynchronous storage APIs are to be preferred.&lt;/p&gt;
&lt;h2 id=&quot;debugging-storage-in-chrome-devtools&quot;&gt;Debugging storage in Chrome DevTools &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/web-storage/#debugging-storage-in-chrome-devtools&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Check out the following docs to learn more about using Chrome DevTools to
inspect and debug your web storage API of choice. APIs not mentioned
here are either not supported in DevTools or are not applicable.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developer.chrome.com/docs/devtools/storage/localstorage/&quot; rel=&quot;noopener&quot;&gt;Local Storage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developer.chrome.com/docs/devtools/storage/sessionstorage/&quot; rel=&quot;noopener&quot;&gt;Session Storage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developer.chrome.com/docs/devtools/storage/cookies/&quot; rel=&quot;noopener&quot;&gt;Cookies&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developer.chrome.com/docs/devtools/storage/cache/&quot; rel=&quot;noopener&quot;&gt;Cache&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developer.chrome.com/docs/devtools/storage/indexeddb/&quot; rel=&quot;noopener&quot;&gt;IndexedDB&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&#39;re using multiple storage APIs, check out the Clear Storage feature of
DevTools. This feature lets you clear multiple stores with a single button
click. See &lt;a href=&quot;https://developer.chrome.com/docs/devtools/progressive-web-apps/#clear-storage&quot; rel=&quot;noopener&quot;&gt;Clear service workers, storage, databases, and
caches&lt;/a&gt; for
more information.&lt;/p&gt;
&lt;h2 id=&quot;where-to-go-next&quot;&gt;Where to go next… &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/web-storage/#where-to-go-next&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Now that we’ve reviewed some of the relevant ways to think about storage
mechanisms and compared the most popular APIs and services available today,
we&#39;ll be adding more content soon to dive more deeply into one or more topics
of interest:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://web.dev/storage-for-the-web/&quot;&gt;Storage for the web&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://web.dev/cache-api-quick-guide/&quot;&gt;Cache API: An introduction&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
    <author>
      <name>Marc Cohen</name>
    </author>
  </entry>
</feed>
