' Usage: https://domain.com/myApp?reset=true
Dim Reset As String = BANano.GetURLParamDefault(BANano.Location.GetHref, "reset", "")
If Reset <> "" Then
#if javascript
navigator.serviceWorker.getRegistrations().then( function(registrations) {
for(let registration of registrations) {
registration.unregister();
}
});
caches.keys().then(function(cacheNames) {
cacheNames.forEach(function(cacheName) {
caches.delete(cacheName);
});
});
#End If
' if you want, reload the page without the reset switch
BANano.Location.Replace(BANano.Location.GetProtocol & "//" & BANano.location.gethost & BANano.location.getpathname)
Return
end if