Explorar o código

httpd: add back immutable flag for static contents

The combination of a low max-age and immutable lets the web browser
cache local content for some time.

The web browser will still cache beyond that time, and so can issue
conditional requests (304 status.)
H. Peter Anvin %!s(int64=2) %!d(string=hai) anos
pai
achega
a4cbce538a
Modificáronse 4 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      esp32/max80/httpd.c
  2. BIN=BIN
      esp32/output/max80.ino.bin
  3. BIN=BIN
      fpga/output/v1.fw
  4. BIN=BIN
      fpga/output/v2.fw

+ 1 - 1
esp32/max80/httpd.c

@@ -655,7 +655,7 @@ static esp_err_t httpd_static_handler(httpd_req_t *req)
     len = snprintf(buffer, buffer_size-2,
 		   "HTTP/1.1 %s\r\n"
 		   "Date: %s\r\n"
-		   "Cache-Control: max-age=10\r\n"
+		   "Cache-Control: max-age=10, immutable\r\n"
 		   "ETag: %s\r\n",
 		   response,
 		   http_now(),

BIN=BIN
esp32/output/max80.ino.bin


BIN=BIN
fpga/output/v1.fw


BIN=BIN
fpga/output/v2.fw