Index: route.t ================================================================== --- route.t +++ route.t @@ -336,11 +336,13 @@ end end end terra http.static_content(co: &lib.srv.convo, [filename], [flen]) var hdrs = array( - lib.http.header{'Content-Type',nil}) + lib.http.header{'Content-Type',nil}, + lib.http.header{'Cache-Control','max-age=2592000'} -- TODO immutable? + ) var [page] = lib.http.page { respcode = 200; headers = [lib.mem.ptr(lib.http.header)] { ptr = &hdrs[0], ct = 1 } Index: srv.t ================================================================== --- srv.t +++ srv.t @@ -207,11 +207,11 @@ key = 'X-Live-Newest-Artifact'; value = lib.math.decstr(lastup, &nbuf[20]); }, lib.http.header { key = 'Content-Length', value = '0' } ) - if self.live_last ~= 0 and self.live_last >= lastup then + if self.live_last ~= 0 and self.live_last == lastup then lib.net.mg_printf(self.con, 'HTTP/1.1 %s', lib.http.codestr(200)) for i = 0, [hdrs.type.N] do lib.net.mg_printf(self.con, '%s: %s\r\n', hdrs[i].key, hdrs[i].value) end lib.net.mg_printf(self.con, '\r\n') Index: static/live.js ================================================================== --- static/live.js +++ static/live.js @@ -31,11 +31,11 @@ }) fetch(req).then(function(resp) { if (!resp.ok) return; let newest = parseInt(resp.headers.get('X-Live-Newest-Artifact')); - if (newest <= container._liveLastArrival) { + if (newest == container._liveLastArrival) { // != also handles some deletions resp.body.cancel(); return; } container._liveLastArrival = newest