Issue or Feature Request Description:
My website is a single-page application, and Nginx uses try_files to return index.html for various routes. I've pre-cached index.html using Workbox. However, I've noticed that when I first visit a route, there is an initial document request, and then the service worker also makes another fetch request for index.html. These are two different requests with different durations,
and the service worker's fetch looks does not use the cache from the initial document request.( because i see the waterfall timeline in chrome devtool)
Is this expected behavior? How can I fix this issue so that only one request is necessary?
Library Affected: workbox-sw, workbox-build
Browser & Platform: "all browsers"
Issue or Feature Request Description: My website is a single-page application, and Nginx uses try_files to return index.html for various routes. I've pre-cached index.html using Workbox. However, I've noticed that when I first visit a route, there is an initial document request, and then the service worker also makes another fetch request for index.html. These are two different requests with different durations,
and the service worker's fetch looks does not use the cache from the initial document request.( because i see the waterfall timeline in chrome devtool)
Is this expected behavior? How can I fix this issue so that only one request is necessary?
nginx.conf:
workbox-config.js
service-worker.js: