Delete cache and specifically service workers
-
Hi, I am using Vivaldi on iOS since the beta and I am very happy with it.
Recently I ran into a problem when testing a webapp.
Or a website converted into a PWA and I bookmarked it to my homescreen.
I needed to make some changes but after reloading the "app" the changes wouldn't become visible.
The funny thing is that one of the adjustments was that I deleted the service worker, but somehow it was still present. I assume in some kind of cache layer.
I tried switching networks (4G / WiFi), removing cache (clear browsing data option in Settings), nothing worked.
Also opening the URL in the Vivaldi browser itself resulted in the same behaviour.
In the end I found a solution through this post on Stack Overflow.
To be able to execute the script that removes a service worker, I connected my iPhone to my Macbook, opened Safari and was able to use the Development Tools from there to inspect my webapp and added the script to the console in the Web Inspector. After executing the script the service worker was finally gone and after a reload I finally viewed the updated "app".
I am aware that this is some kind of edge case, but I find it far from logical to get rid of a service worker in such a complicated way.
My assumption was that by clearing browser data, closing and opening the app again, the service worker should have been gone as well.
Is this something that would be possible to implement?
A nice to have feature would be an option to clear browser data per domain -
My use case is similar. I think if we could delete the cache for a single website, which would include service workers, this would solve the issue.