2019 iPhone WebViews. , .
, , . , . , .
The trick I am doing now to disable the application cache when a service is running intercepts the html request (navigation) and simply removes the attribute manifestfrom <html>.
Something like this in a working service script:
self.addEventListener('fetch', (ev) => {
if (request.mode === 'navigate' && request.method === 'GET') {
ev.respondWith(
fetch(ev.request.url)
.then(r => r.text())
.then(html => new Response(html.replace('manifest=', 'xmanifest='), {
headers: {'Content-Type': 'text/html'}
}))
)
}
})
source
share