diff --git a/internal/webserver/server.go b/internal/webserver/server.go index ef2944f..239c4a5 100644 --- a/internal/webserver/server.go +++ b/internal/webserver/server.go @@ -103,6 +103,8 @@ func (app *Application) ServeHTTP(w http.ResponseWriter, r *http.Request) { parts := strings.Split(r.URL.Path, "/")[1:] switch parts[0] { case "static": + // Static files can be stored in browser cache + w.Header().Set("Cache-Control", "public, max-age=3600") if use_embedded == "true" { // Serve directly from the embedded files http.FileServer(http.FS(embedded_files)).ServeHTTP(w, r)