From 9cc00323ca331e38ebc551a9c8622acdf8b0e414 Mon Sep 17 00:00:00 2001 From: Max Leonard Inden Date: Fri, 5 May 2017 09:30:09 +0200 Subject: [PATCH] Update cache control for web assets The commit [1] introduced the `cache-control` header field with the value `no-cache`. This enforces any cache to revalidate. Apparently this does not prohibit *FireFox* from caching the assets. `no-cache, no-store, must-revalidate` does by prohibiting to even save anything of the request. [1] c3850708c1f31aad1db9cda355698ecdd4755e39 --- ui/web.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/web.go b/ui/web.go index a866ca49..53aba9f6 100644 --- a/ui/web.go +++ b/ui/web.go @@ -40,7 +40,7 @@ func serveAsset(w http.ResponseWriter, req *http.Request, fp string) { return } - w.Header().Set("Cache-Control", "no-cache") + w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate") http.ServeContent(w, req, info.Name(), info.ModTime(), bytes.NewReader(file)) }