Use "immutable" Cache-Control extension

See http://bitsup.blogspot.com/2016/05/cache-control-immutable.html for
more info.

Fixes #103
Closes #119
This commit is contained in:
Michael Jackson
2018-09-01 11:37:42 -07:00
parent fe485060ff
commit 2fc84dfe45
5 changed files with 7 additions and 7 deletions

View File

@ -15,7 +15,7 @@ function serveStaticFile(req, res) {
.set({
"Content-Length": req.entry.size,
"Content-Type": getContentTypeHeader(req.entry.contentType),
"Cache-Control": "public,max-age=31536000", // 1 year
"Cache-Control": "public, max-age=31536000, immutable", // 1 year
"Last-Modified": req.entry.lastModified,
ETag: etag(req.entry.content),
"Cache-Tag": tags.join(",")