How do i tell the browser to use cache manifest if the browser doesn't support service workers?
I have an Angular 4 app that needs to run offline. Service workers do the job brilliantly but it isn't supported by Safari which is a required browser that it needs to run on.
I need to generate a cache manifest file if service workers is not supported by the browser then for the browser to use the cache manifest file once the browser goes offline
current code (typescript):
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('../../service-worker.js').then(function(registration) {
//TODO: Implement Logging
}).catch(function(err) {
//TODO: Implement Logging
});
} else {
//Not currently supported on Internet explorer, Safari, IE Mobile and Safari Mobile. Use old Application Caching instead.
console.log("Not Supported");
//Use cache manifest
}