Workbox service worker maxAgeSeconds query

前端 未结 1 1629
北恋
北恋 2021-01-27 05:50

I have implemented a service worker for my website. However I am not sure about the expiration setting on this.

Am currently using Nextjs for page rendering and Workbox w

相关标签:
1条回答
  • 2021-01-27 06:35

    I think you are confusing the The Cache-Control HTTP header with the Workbox Expiration.

    As the service can reply to a request it may return a file regardless of the Cache-Control header. What you have configured is to have Workbox evict things from it's cache after 50 or 3600 secs. The service worker has it's own cache that can be found in the application tab of the chrome dev tool

    see this question about how the two interact with each other - If you are using Service Workers do you still need cache-control headers?

    0 讨论(0)
提交回复
热议问题