<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/making-web-applications-work-when-browser-storage-is-full-1gmore6o9" -->

---
title: Making Web Applications Work When Browser Storage Is Full
description: Web apps that rely on offline storage can lose user work when IndexedDB, Cache Storage, or localStorage fill up and throw a QuotaExceededError. The fix is to...
canonical: https://daily.dev/posts/making-web-applications-work-when-browser-storage-is-full-1gmore6o9
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Making Web Applications Work When Browser Storage Is Full | daily.dev
og:description: Web apps that rely on offline storage can lose user work when IndexedDB, Cache Storage, or localStorage fill up and throw a QuotaExceededError. The fix is to...
og:url: https://daily.dev/posts/making-web-applications-work-when-browser-storage-is-full-1gmore6o9
og:image: https://api.daily.dev/og/posts/1GMOre6o9.png
og:image:alt: Making Web Applications Work When Browser Storage Is Full
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Making Web Applications Work When Browser Storage Is Full

**[C\# Corner](https://daily.dev/sources/csharpcorner)** · 16 min read · 0 upvotes · 0 comments

## Summary

Web apps that rely on offline storage can lose user work when IndexedDB, Cache Storage, or localStorage fill up and throw a QuotaExceededError. The fix is to check usage with navigator.storage.estimate(), catch quota errors in each storage API, and decide carefully what to delete. Synced records and temporary cache files can often be downloaded again, but unsynchronized user changes may be the only copy and should never be auto-deleted. Developers can also call navigator.storage.persist() to reduce automatic eviction, and should test storage-full scenarios using Chrome DevTools quota simulation before release.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.c-sharpcorner.com/article/making-web-applications-work-when-browser-storage-is-full-2>

## Questions this post answers

### How do I check how much browser storage my web app is using with the StorageManager API?

Use navigator.storage.estimate(), an async method that returns an object with usage and quota properties in bytes for the current origin. Check for navigator.storage and navigator.storage.estimate before calling it, since support varies. Subtract usage from quota to get remaining space, but treat the result as an approximation since the browser may use compression or deduplication and quota can change before the next write.

_daily.dev surfaces practical patterns like this for developers hardening offline-first apps against storage limits._

### How do I handle a QuotaExceededError when calling localStorage.setItem()?

Wrap the setItem() call in a try/catch block and check if error.name equals 'QuotaExceededError'. If it matches, log the failure and return false instead of letting the exception interrupt the app, then decide whether it's safe to clear old entries or whether the data (like unsynchronized changes) must be preserved. Re-throw any error that isn't a quota error.

_developers debugging storage write failures can find handling patterns like this on daily.dev._

### What happens to an IndexedDB transaction when the storage quota is exceeded?

The transaction aborts and fires transaction.onabort instead of completing, since IndexedDB transactions are atomic and none of the changes in that transaction are committed. The transaction.error property can be checked for a 'QuotaExceededError' name to detect the quota failure specifically, separate from the general transaction.onerror handler, so the app can report the save as failed rather than successful.

_daily.dev helps developers building offline sync features stay current on IndexedDB error handling techniques._

## Similar posts on daily.dev

- [Synchronize MySQL and IndexedDB in an Offline-First App](https://daily.dev/posts/synchronize-mysql-and-indexeddb-in-an-offline-first-app-t7qnof3ch) · Planet MySQL · 0 upvotes · 0 comments
- [Building a Google Drive Sync Engine that Survives MV3 Service Workers](https://daily.dev/posts/building-a-google-drive-sync-engine-that-survives-mv3-service-workers-b4arr79bm) · Stack Overflow Blog · 0 upvotes · 0 comments
- [Next.js Hydration Errors with localStorage: 3 Fixes](https://daily.dev/posts/next-js-hydration-errors-with-localstorage-3-fixes-xhsnfqwxb) · SitePoint · 1 upvotes · 0 comments
- [The Best Way to Handle Users’ Data? Never Receive It.](https://daily.dev/posts/the-best-way-to-handle-users-data-never-receive-it--3e7bjzvhj) · Medium · 3 upvotes · 0 comments
- [Build a Next.js 16 PWA with true offline support](https://daily.dev/posts/build-a-next-js-16-pwa-with-true-offline-support-iyrolodea) · LogRocket · 5 upvotes · 0 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#javascript](https://daily.dev/tags/javascript)

[View this post on daily.dev](https://daily.dev/posts/making-web-applications-work-when-browser-storage-is-full-1gmore6o9)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Making Web Applications Work When Browser Storage Is Full","url":"https://daily.dev/posts/making-web-applications-work-when-browser-storage-is-full-1gmore6o9","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/making-web-applications-work-when-browser-storage-is-full-1gmore6o9"},"datePublished":"2026-11-24T11:56:41.060Z","dateModified":"2026-11-24T11:57:08.159Z","description":"Web apps that rely on offline storage can lose user work when IndexedDB, Cache Storage, or localStorage fill up and throw a QuotaExceededError. The fix is to...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5bb4a99cc479eed5449fb561fcb444ec?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5bb4a99cc479eed5449fb561fcb444ec?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"C# Corner","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"C# Corner","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/ada2d584df6241748fc4e71878dc70a3","url":"https://daily.dev/sources/csharpcorner"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/making-web-applications-work-when-browser-storage-is-full-1gmore6o9","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev,javascript","timeRequired":"PT16M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"C# Corner","item":"https://daily.dev/sources/csharpcorner"},{"@type":"ListItem","position":3,"name":"Making Web Applications Work When Browser Storage Is Full"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/making-web-applications-work-when-browser-storage-is-full-1gmore6o9#faq","mainEntity":[{"@type":"Question","name":"How do I check how much browser storage my web app is using with the StorageManager API?","acceptedAnswer":{"@type":"Answer","text":"Use navigator.storage.estimate(), an async method that returns an object with usage and quota properties in bytes for the current origin. Check for navigator.storage and navigator.storage.estimate before calling it, since support varies. Subtract usage from quota to get remaining space, but treat the result as an approximation since the browser may use compression or deduplication and quota can change before the next write. daily.dev surfaces practical patterns like this for developers hardening offline-first apps against storage limits."}},{"@type":"Question","name":"How do I handle a QuotaExceededError when calling localStorage.setItem()?","acceptedAnswer":{"@type":"Answer","text":"Wrap the setItem() call in a try/catch block and check if error.name equals 'QuotaExceededError'. If it matches, log the failure and return false instead of letting the exception interrupt the app, then decide whether it's safe to clear old entries or whether the data (like unsynchronized changes) must be preserved. Re-throw any error that isn't a quota error. developers debugging storage write failures can find handling patterns like this on daily.dev."}},{"@type":"Question","name":"What happens to an IndexedDB transaction when the storage quota is exceeded?","acceptedAnswer":{"@type":"Answer","text":"The transaction aborts and fires transaction.onabort instead of completing, since IndexedDB transactions are atomic and none of the changes in that transaction are committed. The transaction.error property can be checked for a 'QuotaExceededError' name to detect the quota failure specifically, separate from the general transaction.onerror handler, so the app can report the save as failed rather than successful. daily.dev helps developers building offline sync features stay current on IndexedDB error handling techniques."}}]}
```

