How-To Guide

Enable localStorage in Chrome, Firefox, Edge, Safari, and Brave

Local Storage is blocked or unavailable

Updated: June 29, 2026By Noah KimReviewed: June 29, 2026 by Dana Brooks

Validate each fix by re-running Storage Test.

Browser window showing saved key cards with a green storage check badge

Features That Require This

  • →Progressive Web Apps (PWAs)
  • →Browser-based games and saved progress
  • →Offline document editors
  • →Theme, language, and layout preferences
  • →Shopping cart state before checkout
  • →Single sign-on and embedded app flows

Direct answer

To enable localStorage, allow the affected site to save cookies and site data, reload the page, then rerun the Storage Test. In modern browsers, a cookie/site-data block often prevents localStorage from persisting too. If the test still fails, clear only that site's data, leave private mode, check quota and disk space, and look for extensions or managed-device policies.

Use this order so you do not wipe useful data by accident:

  1. Run the Storage Test and note localStorage, sessionStorage, cookies, and quota.
  2. Change one setting for the affected site.
  3. Reload the same tab.
  4. Rerun the test and compare the result.

If cookies are also red, fix them first with the Cookie Test and the enable cookies guide.

Decision chart for fixing blocked localStorage by checking cookies, private mode, site data, quota, extensions, and policy

Use this decision chart when the Storage Test shows localStorage blocked but the cause is not obvious.

What a blocked localStorage result means

localStorage is a per-origin browser storage area for string key/value data. MDN's localStorage reference notes that browsers can throw a SecurityError when a policy prevents persistence, and that blocking cookies is commonly treated as a signal to prevent persistent storage. MDN's storage quota guide also lists Web Storage at about 5 MiB for localStorage and 5 MiB for sessionStorage per origin across browsers, with QuotaExceededError when the limit is hit.

For a user, the symptom is usually not "localStorage" by name. It looks like this:

  • A web app forgets dark mode, language, filters, or layout after refresh.
  • A game saves until you close the tab, then loses progress.
  • A PWA installs but does not keep offline state.
  • A checkout, SSO, or embedded board loops because stored state never sticks.
  • DevTools Console shows SecurityError, QuotaExceededError, or "access to storage is not allowed."

Fast fixes by browser

BrowserSetting to checkSite-level fix
ChromeSettings > Privacy and security > Third-party cookies, then Site settings or On-device site dataAdd the affected domain under sites allowed to use cookies/site data. Use https://example.com or [*.]example.com only when the app uses subdomains.
EdgeSettings > Cookies and site permissions > Manage and delete cookies and site dataAdd the domain to the allow list, then restart Edge if the site was open during the change.
FirefoxSettings > Privacy & Security > Cookies and Site DataClick Manage Exceptions, enter the exact site address, choose Allow, and keep Enhanced Tracking Protection on Standard while testing.
Safari on MacSafari > Settings > PrivacyMake sure Block all cookies is off. If the site is embedded in another site, temporarily test with cross-site tracking prevention relaxed, then turn it back on.
BraveShields icon for the site, plus Settings > ShieldsSet cookies to Cross-site only or allow the site while testing. If the test passes with Shields down, add a site exception instead of lowering protection globally.

Reload the affected app after changing settings. Browser storage permissions are evaluated per site and often do not update until the document reloads.

Use site exceptions, not global allow

Most top-ranking help pages tell users to allow all cookies. That works, but it is broader than necessary. Prefer a site exception:

  • Add the app's main domain, for example https://app.example.com.
  • Add the identity provider only if login is embedded, for example https://login.example.com.
  • Add payment, chat, or board subdomains only when the failing workflow uses them.
  • Avoid adding http:// if the real site uses https://; storage is separated by protocol.

If the issue happens inside an iframe, localStorage may be blocked even when the top-level site passes. Run Browser Privacy Check and the third-party cookies login guide if the broken screen is an embedded login, checkout, help desk, or Trello/Notion/Asana-style board inside another app.

Leave private browsing while testing

Incognito, InPrivate, and Private Browsing windows are useful for diagnosis, but they are poor proof that storage will persist. Private sessions usually delete stored data when the last private window closes, and some browsers apply stricter third-party storage rules in those windows.

Test in a normal profile first. If normal mode passes but private mode fails, the browser is behaving as designed. Keep the private session open until the workflow is complete, or use a normal profile for apps that must remember state.

Clear only the broken site's data

If localStorage exists but writes fail, the site's stored data may be corrupt or over quota. Clear one site, not the whole browser.

Chrome, Edge, and Brave

  1. Open the affected site.
  2. Click the tune, lock, or site-info icon in the address bar.
  3. Open cookies/site data or site settings.
  4. Remove data for that exact domain.
  5. Reload, sign in again, and rerun the Storage Test.

For developer-level confirmation, open DevTools > Application > Storage > Local storage. Chrome's DevTools localStorage docs show that you can inspect and delete individual localStorage keys there.

Firefox

  1. Open Settings > Privacy & Security.
  2. Under Cookies and Site Data, choose Manage Data.
  3. Search for the domain.
  4. Remove the selected site and save changes.
  5. Reload the site and rerun the test.

Safari

  1. Open Safari Settings > Privacy.
  2. Choose Manage Website Data.
  3. Search for the domain and remove it.
  4. Reopen the site and test again.

Clearing site data can delete offline drafts, local-only game saves, or unsynced PWA files. If the app has an export or sync button, use it before clearing.

Check quota, disk space, and app size

When the test shows storage is available but the app still cannot save, look for QuotaExceededError.

  • Free disk space on the system drive. Browsers can refuse writes when the profile drive is nearly full.
  • Remove large old site data from apps you no longer use.
  • If the failing app stores documents or media offline, also test IndexedDB because larger app data usually lives there, not in localStorage.
  • If only a video, game, or 3D app fails after storage is fixed, continue with the Full Browser Test to catch missing JavaScript, WebGL, or codec support.

Confirm JavaScript is allowed

localStorage is accessed through JavaScript. If JavaScript is blocked, the storage API may technically exist but the app cannot use it.

  • Run the Full Browser Test. If many cards are blank or the test does not run, follow the enable JavaScript guide.
  • Chrome/Edge/Brave: Settings > Privacy and security > Site settings > JavaScript should allow the site.
  • Firefox: if you changed advanced prefs, confirm dom.storage.enabled is true in about:config.

Do not change random about:config or chrome://flags entries unless you know why they were changed. Site-data settings, extensions, and policies cause most user-facing localStorage failures.

Disable storage-cleaning extensions

Storage blockers often look like privacy tools rather than "localStorage" tools. Test with extensions disabled or in a clean profile if the Storage Test passes in one browser but fails in another.

Common culprits:

  • Cookie AutoDelete, Forget Me Not, Temp Containers, or similar auto-clear tools
  • Strict uBlock Origin, AdGuard, Ghostery, DuckDuckGo Privacy Essentials, or Privacy Badger rules
  • Container/profile extensions that isolate the same site into multiple storage jars
  • Script blockers that prevent the app's storage code from running

After the app works, re-enable extensions one by one. Keep the exception as narrow as possible: the affected app domain, not every site.

Managed device checks

On a work or school browser, storage may be blocked by policy. You usually cannot fix that from normal settings.

  • Chrome: open chrome://policy and search for cookie or storage policies such as DefaultCookiesSetting, CookiesAllowedForUrls, or CookiesBlockedForUrls.
  • Edge: open edge://policy and look for the same cookie/site-data restrictions.
  • Firefox Enterprise/ESR: check whether the organization enforces cookie, tracking protection, or storage settings.

Send IT a screenshot of the failing Storage Test plus the policy line. Ask for a site-specific allow rule for the app and any login/payment domains it embeds.

Figure callout: For support tickets, attach two screenshots: the Storage Test before the change and the same test after the site exception. The useful lines are localStorage, sessionStorage, cookies, quota, browser name, and profile mode.

Console check for developers

If you are debugging your own site, open DevTools Console on the affected origin and run:

try {
  localStorage.setItem("bt_storage_test", "ok");
  console.log(localStorage.getItem("bt_storage_test"));
  localStorage.removeItem("bt_storage_test");
} catch (error) {
  console.error(error.name, error.message);
}

Interpret the result:

ResultLikely causeNext step
oklocalStorage works on this originCheck app logic, a different subdomain, or an iframe/third-party context.
SecurityErrorBrowser policy, cookie/site-data block, private context, or invalid origin such as file:Allow site data for the real https:// origin and test outside private mode.
QuotaExceededErrorStorage area is full or the profile/disk is constrainedClear the site's old data or free disk space.
Reference or script errorJavaScript is blocked or the page is not running normallyFix JavaScript/extension blockers first.

Verify the fix

Run the Storage Test again. A healthy result should show:

  • localStorage: yes
  • sessionStorage: yes
  • Cookies: yes, if the app uses login/session state
  • Quota: non-zero

Then reload the real app and repeat the failing action: save a preference, add an item to a cart, complete one game checkpoint, or reopen the PWA. If storage passes but the app still fails, run the Full Browser Test next and check related guides for cookies, IndexedDB, and PWAs not installing.

FAQ

How do I enable localStorage quickly?
Allow cookies and site data for the affected domain, reload the page, and rerun the Storage Test. In most browsers, blocking cookies also blocks or limits localStorage.
Is localStorage safe for passwords or tokens?
No. Any script running on that origin can read localStorage. Use it for preferences and non-sensitive cached state, not passwords, recovery codes, or long-lived authentication tokens.
Will clearing cache delete localStorage?
Not usually. Clearing cached files removes downloaded assets; clearing cookies and site data removes storage such as cookies, localStorage, IndexedDB, and Cache API data for that site.
Why does localStorage work in a normal window but fail in private browsing?
Private, Incognito, and InPrivate windows often use temporary storage and delete it when the private session ends. Some browsers also apply stricter third-party storage limits in private mode.

Test Your Browser Capabilities

Run a quick test to see which modern web features your browser supports.

⚡Run Capability Test