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:
- Quick 3-Click Reset (via Browser Address Bar).
- Deep Developer Reset (via Chrome DevTools Inspect โ Application tab).
- 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:
- No Subscription Allowed: Browsers disable background push keys in Incognito mode so websites cannot track users across sessions.
- Permission Prompts Disappear: The browser will either automatically suppress notification permission prompts or keep them disabled.
- 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.
- Click the "Tune / Lock" Icon: Located on the left side of your browser's address bar next to the URL.
- Click "Reset permission": Next to Notifications, click Reset permission to restore the prompt to its default state.
- Click "Clear data": Clean out the website's cached files and offline data.
- Reload the Page: Press
Ctrl + F5(Windows) orCmd + 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.
Step 1: Open Developer Tools (Inspect)
- Press
F12on your keyboard, OR - Press
Ctrl + Shift + I(Windows / Linux) orCmd + 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:
- Click on Storage (see Pointer 2).
- Make sure the following options are checked:
- โ Unregister service workers
- โ Local and session storage
- โ IndexedDB
- โ Cache storage
- โ Cookies
- 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:
- Click Service workers in the left sidebar under Application.
- Look for the active service worker file (e.g.,
sw.js). - Click the "Unregister" button (see Pointer 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.
Method A: Directly on Android Phone (Chrome Site Settings)
- Open Google Chrome on your Android device.
- Tap the 3 dots
โฎmenu in the top-right corner and select Settings. - Scroll down and tap Site settings โ All sites (or Data stored).
- Find or search for your website domain (e.g.,
yourwebsite.com). - Tap on the domain name to view its stored data size and permissions.
- Tap the red "Clear & reset" button (see Pointer 1 in the mobile graphic above).
- 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?
- On your Android phone, enable Developer options and turn on USB debugging.
- Connect your phone to your computer using a USB cable.
- On your computer, open Google Chrome and navigate to:
chrome://inspect/#devices - Check "Discover USB devices". Your connected phone and its open Chrome tabs will appear in the list.
- Find your website tab and click the "inspect" link (see Pointer 2 in the screenshot above).
- A desktop DevTools window will open mirroring your phone's browser!
- 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):
- Delete the PWA: Touch and hold the website's App Icon on your iPhone home screen โ tap "Delete Bookmark / Delete App".
- Clear Safari Website Data: Open iPhone Settings โ Safari โ Advanced โ Website Data โ Search your domain โ Swipe left to delete.
- Re-add to Home Screen: Open Safari, tap the Share button โ tap "Add to Home Screen" โ tap Add.
- 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 |