Closed fseebach closed 7 years ago
@fracoon are you sure about it's NGSW the one which caches/retrieves from the cache API calls? The Dynamic
plugin, which could do it, is not merged to master yet: https://github.com/angular/mobile-toolkit/pull/141
For the moment, only Static (install-time) caching is available (ignore
is related to Static only), so the API calls intercepting fact sounds really strange
@webmaxru, I am also seeing this. Resources that requested when online are cached and can later be retrieved by the ServiceWorker when offline.
Isn't that expected?
In my case you are right @webmaxru ... It was not coming from the serviceworker. The data was held in the service and displayed from there.. Clearing out the data on http error solved the "problem"
@gkalpak are you about the app files themselves (app shell) or about API calls responses? The last ones should not be processed by NGSW
at all. If you have these - check the possible leftovers of other SWs registered against your app
@webmaxru, you are right. The data was coming from the app (although the Network tab shows "From ServiceWorker") :confused:
@fracoon Could you please close the issue then?
I've setup the serviceworker for an angular-cli project (Angular4) The service worker works great for making the app run out of the cache!
Hower i noticed that in offline mode ALL requests to my backend are served from cache if they were requested once while online. Is there any possibility to turn off caching for urls? In my case everything to /api/** should bypass cache since the app always needs the latest data. I want to display an error in case of no connection.