Polymer / pwa-starter-kit

Starter templates for building full-featured Progressive Web Apps from web components.
https://pwa-starter-kit.polymer-project.org
2.36k stars 431 forks source link

Set service-worker.js to Cache-Control: max-age=0? #310

Closed abdonrd closed 5 years ago

abdonrd commented 5 years ago

Should we set service-worker.js to Cache-Control: max-age=0, right?

Something like this in the server/app.yml?

handlers:
- url: /service-worker\.js
  static_files: service-worker.js
  upload: service-worker\.js
  expiration: 0m
keanulee commented 5 years ago

Could be something added to prpl-server since that's the thing setting cache headers now and already does some special stuff for SW. See https://github.com/Polymer/prpl-server/blob/1e66a56002b294a8121a6089735690b7c45580f4/src/prpl.ts#L146

keanulee commented 5 years ago

Fixed by bumping to prpl-server@1.4.0 and deployed.

abdonrd commented 5 years ago

@keanulee awesome! Thanks Keanu! I deployed with prpl-server@1.4.0, and it works!