How to reset push notification permission on a PWA
You can work with multiple push-enabled PWAs. So if you have allowed push for your previous PWA, the request for push permission will no longer be displayed for the new PWA if you are on the same domain. Therefore, you must clear the cache of your Chrome browser for each new PWA and reactivate the push notification permissions.
How to reset push notification permission on the Chrome browser?
For desktop Chrome browser: Click on the green padlock icon shown in the address bar. Choose “Ask (default)” in Notifications. Then reload / hard reload the page.
For Android Chrome browser: Click on the green padlock icon shown in the address bar. Then click on “Permissions” and then click on the “Reset permissions” button and reload the page.
You also have to clear cookies and cache.
How to clear the cache for PWA on the desktop Chrome browser?
For general cache clear you can follow this guide.
Open your PWA on the desktop Chrome browser right-click and choose “Inspect / Inspect element“. Then click on the “Application” tab and then “Storage”.
Here scroll and find “Clear site data” click on it and then reload / hard reload the page.
How to hard reload the page on the Chrome browser?
To hard refresh on Google Chrome on Windows, there are two ways you can do it:
(1) Hold down Ctrl and click the Reload button.
(2) Or Hold down Ctrl and press F5.
To do a hard refresh on Google Chrome on Mac, there are two ways that you can do it:
(1) Hold down Shift and click the Reload button.
(2) Hold down Command, Shift, and click the ‘R’ key.
Tip for empty cache and hard reload:
While your inspect element panel is opened, you can right-click on the browser reload icon and choose “Empty cache and hard reload“.
How to clear the cache for PWA on Safari (iPhone)?
- From the home screen, Select Settings > Safari.
- At the bottom of Safari's settings screen, Select Clear Cookies and Data or Clear Cookies and Clear Cache.
- Confirm when prompted.