Просмотр исходного кода

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 2 лет назад
Родитель
Сommit
a4cbce538a
4 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      esp32/max80/httpd.c
  2. BIN
      esp32/output/max80.ino.bin
  3. BIN
      fpga/output/v1.fw
  4. 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
esp32/output/max80.ino.bin


BIN
fpga/output/v1.fw


BIN
fpga/output/v2.fw