Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save krzysztofjeziorny/548d9ee9924df30e06b894b65798f3f6 to your computer and use it in GitHub Desktop.
Save krzysztofjeziorny/548d9ee9924df30e06b894b65798f3f6 to your computer and use it in GitHub Desktop.
Apache conf/htaccess for setting Cache-Control option for service worker file
<IfModule mod_headers.c>
<filesmatch "sw.js">
Header set Cache-Control "max-age=0, private"
</filesmatch>
</IfModule>
Check with:
curl -I -L http://www.example.com/sw.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment