Skip to content

Commit fc40c49

Browse files
committed
feat(gatsby-plugin-netlify) Do not cache service worker file
Related to https://www.netlify.com/blog/2018/06/28/5-pro-tips-and-plugins-for-optimizing-your-gatsby---netlify-site/#4-get-your-service-workers-um-working Recommandation is not to cache service worker file : w3c/ServiceWorker#893
1 parent a8aa875 commit fc40c49

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/gatsby-plugin-netlify/src/constants.js

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export const SECURITY_HEADERS = {
2626

2727
export const CACHING_HEADERS = {
2828
"/static/*": [`Cache-Control: public, max-age=31536000, immutable`],
29+
"/sw.js": [`Cache-Control: no-cache`],
2930
}
3031

3132
export const LINK_REGEX = /^(Link: <\/)(.+)(>;.+)/

0 commit comments

Comments
 (0)