Skip to content

Commit

Permalink
Change tracker.js Cache-Control header to no-store
Browse files Browse the repository at this point in the history
According to all documentation I can find, `no-store` is the strongest "do not cache" `Cache-Control` header there is, and `no-cache` and `must-revalidate` are strictly weaker and will have no effect when `no-store` is present. Additionally, I cannot find any evidence that these other values are useful for backwards compatibility or older browsers, and `no-store` support appears to be universal. Lastly, webhint.io is specifically telling me that I should not use `must-revalidate`.
  • Loading branch information
JacobEvelyn authored Oct 17, 2019
1 parent 02f6c6b commit c461afa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/api/collect.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (c *Collector) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// headers to prevent caching
w.Header().Set("Content-Type", "image/gif")
w.Header().Set("Expires", "Mon, 01 Jan 1990 00:00:00 GMT")
w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
w.Header().Set("Cache-Control", "no-store")
w.Header().Set("Pragma", "no-cache")

// response, 1x1 px transparent GIF
Expand Down

0 comments on commit c461afa

Please sign in to comment.