Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
The release notes on GitHub are taken from this file: the section whose
heading is the version number.

## 1.5.1

- The web UI's scripts and styles are no longer kept by the browser across
an upgrade: after replacing the program, a normal reload shows the new
pages (before, an old app.js could stay in the browser's cache).

## 1.5.0

Includes the changes listed under 1.2.3: the 1.2.3 release was built from
Expand Down
7 changes: 4 additions & 3 deletions internal/api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,10 @@ func (s *Server) Handler() http.Handler {
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("X-Content-Type-Options", "nosniff")
w.Header().Set("Referrer-Policy", "no-referrer")
if r.URL.Path == "/" || r.URL.Path == "/index.html" {
w.Header().Set("Cache-Control", "no-cache")
}
// no-cache on every file: after an upgrade the browser must not keep
// the old app.js or app.css (the embedded files carry no date to
// revalidate against, so a cached copy could outlive the program)
w.Header().Set("Cache-Control", "no-cache")
static.ServeHTTP(w, r)
})
return mux
Expand Down