From 21a18eced6e1866b088994858f89aea1b9b125f7 Mon Sep 17 00:00:00 2001 From: Laurence Withers Date: Thu, 25 Apr 2019 14:47:13 +0100 Subject: [PATCH] cmd/packserver: use Cache-Control: no-cache Rather than setting "Cache-Control: no-store", use "no-cache". The difference is that "no-store" tells the browser that it must always completely re-fetch the resource; whereas "no-cache" means that the browser can write the resource to disk but must re-validate it (e.g. using Etags) before re-using it. --- cmd/packserver/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/packserver/main.go b/cmd/packserver/main.go index 39014d2..58c9575 100644 --- a/cmd/packserver/main.go +++ b/cmd/packserver/main.go @@ -111,7 +111,7 @@ func run(c *cobra.Command, args []string) error { return err } if expiry <= 0 { - extraHeaders.Set("Cache-Control", "no-store") + extraHeaders.Set("Cache-Control", "no-cache") } else { extraHeaders.Set("Cache-Control", fmt.Sprintf("public, max-age=%d", expiry/1e9))