HyperPush X HyperPush X Docs
Browse Guides
Index โ–พ

How to Clear Browser Cache, Service Worker Data & Reset Push Notifications (Desktop & Mobile)

๐Ÿ“ Getting Started ๐Ÿ• Updated 12 hours ago

How to Clear Browser Cache, Service Worker Data & Reset Push Notification Permissions

When developing, testing, or troubleshooting Web Push notifications and Progressive Web Apps (PWA), browsers aggressively store cached files, active background Service Workers, offline Cache Storage, and permission states (Allow / Block).

If you accidentally clicked "Block", if updates are not reflecting, or if you need to test re-subscribing from a completely clean state, this guide covers both:

  1. Quick 3-Click Reset (via Browser Address Bar).
  2. Deep Developer Reset (via Chrome DevTools Inspect โž” Application tab).
  3. Mobile Reset (Directly on phone & via PC Remote Debugging chrome://inspect).

[!CAUTION]

๐Ÿšซ Important: Never Test Push Notifications in Incognito or Private Windows!

All major browsers (Google Chrome, Apple Safari, Microsoft Edge, Mozilla Firefox) permanently disable Web Push notifications and PWA installations in Incognito / Private mode by design:

  1. No Subscription Allowed: Browsers disable background push keys in Incognito mode so websites cannot track users across sessions.
  2. Permission Prompts Disappear: The browser will either automatically suppress notification permission prompts or keep them disabled.
  3. Data Erased on Tab Close: Even if temporary memory holds data, closing the incognito tab instantly deletes all keys and subscriptions.

๐Ÿ‘‰ Always use a standard, regular browser window when subscribing to or testing push notifications!


๐Ÿ–ฅ๏ธ Part 1: Quick Reset via Address Bar (Desktop Chrome, Edge & Brave)

For everyday users or quick resets, you can clear cached data and reset notification permissions directly from the URL address bar.

Desktop Chrome Browser Reset Steps

  1. Click the "Tune / Lock" Icon: Located on the left side of your browser's address bar next to the URL.
  2. Click "Reset permission": Next to Notifications, click Reset permission to restore the prompt to its default state.
  3. Click "Clear data": Clean out the website's cached files and offline data.
  4. Reload the Page: Press Ctrl + F5 (Windows) or Cmd + Shift + R (Mac). Click "Allow" when the prompt reappears!

๐Ÿ› ๏ธ Part 2: Deep Reset via Chrome Inspect (DevTools "Application" Tab)

When you need to completely remove the background Service Worker (sw.js), empty Cache Storage, and erase IndexedDB databases, use Chrome's Application panel.

Chrome DevTools Application Tab Service Worker and Storage Clear

Step 1: Open Developer Tools (Inspect)

  • Press F12 on your keyboard, OR
  • Press Ctrl + Shift + I (Windows / Linux) or Cmd + Option + I (Mac), OR
  • Right-click anywhere on the webpage and select Inspect.

Step 2: Go to the "Application" Tab

In the top navigation bar of DevTools, click on the Application tab (see Pointer 1 in the screenshot above). (If your DevTools window is narrow, click the >> icon to reveal hidden tabs and select Application).

Step 3: Clear Site Data & Storage

In the left sidebar under the Application heading:

  1. Click on Storage (see Pointer 2).
  2. Make sure the following options are checked:
    • โ˜‘ Unregister service workers
    • โ˜‘ Local and session storage
    • โ˜‘ IndexedDB
    • โ˜‘ Cache storage
    • โ˜‘ Cookies
  3. Click the red "Clear site data" button (see Pointer 3).
    • This instantly purges all cached assets, wipes local databases, and unregisters the active Service Worker.

Step 4: Alternative โ€” Unregister Service Worker Directly

If you only want to stop and remove the Service Worker without clearing other website cookies:

  1. Click Service workers in the left sidebar under Application.
  2. Look for the active service worker file (e.g., sw.js).
  3. Click the "Unregister" button (see Pointer 4).
  4. (Bonus) Check the "Update on reload" checkbox so the browser fetches the latest service worker code every time you refresh.

๐Ÿ“ฑ Part 3: Mobile Service Worker & Storage Clear (Android & iOS)

Mobile devices also cache Service Workers and offline PWA data. Here is how to clear them on phone or through your PC.

Mobile Service Worker and Storage Reset Methods

Method A: Directly on Android Phone (Chrome Site Settings)

  1. Open Google Chrome on your Android device.
  2. Tap the 3 dots โ‹ฎ menu in the top-right corner and select Settings.
  3. Scroll down and tap Site settings โž” All sites (or Data stored).
  4. Find or search for your website domain (e.g., yourwebsite.com).
  5. Tap on the domain name to view its stored data size and permissions.
  6. Tap the red "Clear & reset" button (see Pointer 1 in the mobile graphic above).
  7. Confirm the dialog. Reopen your site and pull down to refresh!

[!TIP] Complete Chrome Android App Clear: You can also long-press the Chrome app icon on your home screen โž” tap App info (โ“˜) โž” tap Storage & cache โž” tap Clear cache.


Method B: Inspect Android Phone from PC via chrome://inspect

Did you know you can open the full desktop Chrome DevTools (Inspect) Application tab for a webpage running on your physical Android phone?

  1. On your Android phone, enable Developer options and turn on USB debugging.
  2. Connect your phone to your computer using a USB cable.
  3. On your computer, open Google Chrome and navigate to:
    chrome://inspect/#devices
    
  4. Check "Discover USB devices". Your connected phone and its open Chrome tabs will appear in the list.
  5. Find your website tab and click the "inspect" link (see Pointer 2 in the screenshot above).
  6. A desktop DevTools window will open mirroring your phone's browser!
  7. Click the Application tab โž” Storage โž” "Clear site data" to clear the mobile phone's Service Worker and cache directly from your computer!

Method C: Apple iPhone & iPad (iOS 16.4+ PWA Reset)

Apple runs Web Push exclusively through Home Screen Web Apps (PWA):

iPhone iOS PWA Installation and Notification Permission

  1. Delete the PWA: Touch and hold the website's App Icon on your iPhone home screen โž” tap "Delete Bookmark / Delete App".
  2. Clear Safari Website Data: Open iPhone Settings โž” Safari โž” Advanced โž” Website Data โž” Search your domain โž” Swipe left to delete.
  3. Re-add to Home Screen: Open Safari, tap the Share button โž” tap "Add to Home Screen" โž” tap Add.
  4. Open and Re-Subscribe: Tap the fresh icon on your home screen and tap "Allow" when iOS prompts for notification permission.

๐Ÿ”„ Quick Reference Matrix

Goal Where to Go Action
Quick Permission Reset Address Bar Tune/Lock Icon Click Reset permission โž” Reload
Delete Service Worker (sw.js) DevTools (F12) โž” Application โž” Service Workers Click Unregister
Purge Cache & IndexedDB DevTools (F12) โž” Application โž” Storage Click Clear site data
Reset Android Mobile Browser Chrome โž” Settings โž” Site settings โž” All sites Tap Clear & reset
Inspect Mobile via Computer Desktop Chrome โž” chrome://inspect/#devices Click inspect โž” DevTools Application tab
Reset iOS Web Push iPhone Home Screen Delete PWA Icon โž” Clear Safari Data โž” Re-add
Test Notifications Safely Regular Browser Window Never use Incognito / Private mode
Logo Notification Inbox 3
PREMIUM FEATURE Want this Notification Inbox on your website? Upgrade to HyperPush X Premium to get live floating in-app notification inbox on your own site & web app.
Upgrade to Premium โšก
Language