1

Service workers have a maximum cache expiry of 24 hours to protect developers. In my situation, I want a long cache expiry length. Is there a way that this 24 hour maximum be bypassed?

Community
  • 1
  • 1
Randomblue
  • 112,777
  • 145
  • 353
  • 547
  • 3
    Just to clarify: cache expiry of the service worker script has nothing to do with how long service worker is registered. Your service worker will remain registered until removed, cache expire only determines how often browser will check for newer version of the service worker script. – pirxpilot Feb 04 '17 at 21:41
  • Yes, that's exactly right. I want to prevent the browser from checking for newer versions of the service worker script, or at the very least have a service worker script that prevents its own removal through the checking of a newer version of the service worker script by the browser. – Randomblue Feb 05 '17 at 09:48

1 Answers1

0

This answer might Help.Note The HTTP request to refresh the service worker will obey standard HTTP cache directives, with one exception https://stackoverflow.com/a/38854905/7069438

Eminem347
  • 387
  • 4
  • 11