diff --git a/lib/SvelteUi/include/AmsWebHeaders.h b/lib/SvelteUi/include/AmsWebHeaders.h index d254ebb0..582e50ad 100644 --- a/lib/SvelteUi/include/AmsWebHeaders.h +++ b/lib/SvelteUi/include/AmsWebHeaders.h @@ -8,7 +8,8 @@ static const char HEADER_LOCATION[] PROGMEM = "Location"; static const char CACHE_CONTROL_NO_CACHE[] PROGMEM = "no-cache, no-store, must-revalidate"; static const char CONTENT_ENCODING_GZIP[] PROGMEM = "gzip"; static const char CACHE_1HR[] PROGMEM = "public, max-age=3600"; -static const char CACHE_1MO[] PROGMEM = "public, max-age=2592000"; +static const char CACHE_1MO[] PROGMEM = "public, max-age=2630000"; +static const char CACHE_1YR[] PROGMEM = "public, max-age=31536000"; static const char PRAGMA_NO_CACHE[] PROGMEM = "no-cache"; static const char EXPIRES_OFF[] PROGMEM = "-1"; static const char AUTHENTICATE_BASIC[] PROGMEM = "Basic realm=\"Secure Area\""; diff --git a/lib/SvelteUi/src/AmsWebServer.cpp b/lib/SvelteUi/src/AmsWebServer.cpp index e2d340b1..2308a7fe 100644 --- a/lib/SvelteUi/src/AmsWebServer.cpp +++ b/lib/SvelteUi/src/AmsWebServer.cpp @@ -191,14 +191,14 @@ void AmsWebServer::notFound() { void AmsWebServer::githubSvg() { if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf_P(PSTR("Serving /github.svg over http...\n")); - server.sendHeader(HEADER_CACHE_CONTROL, CACHE_1HR); + server.sendHeader(HEADER_CACHE_CONTROL, CACHE_1MO); server.send_P(200, "image/svg+xml", GITHUB_SVG); } void AmsWebServer::faviconSvg() { if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf_P(PSTR("Serving /favicon.ico over http...\n")); - server.sendHeader(HEADER_CACHE_CONTROL, CACHE_1HR); + server.sendHeader(HEADER_CACHE_CONTROL, CACHE_1MO); server.send_P(200, "image/svg+xml", FAVICON_SVG); } @@ -768,7 +768,7 @@ void AmsWebServer::indexCss() { if(!checkSecurity(2)) return; - server.sendHeader(HEADER_CACHE_CONTROL, CACHE_1MO); + server.sendHeader(HEADER_CACHE_CONTROL, CACHE_1YR); server.sendHeader(HEADER_CONTENT_ENCODING, CONTENT_ENCODING_GZIP); server.send_P(200, MIME_CSS, INDEX_CSS, INDEX_CSS_LEN); } @@ -779,7 +779,7 @@ void AmsWebServer::indexJs() { if(!checkSecurity(2)) return; - server.sendHeader(HEADER_CACHE_CONTROL, CACHE_1MO); + server.sendHeader(HEADER_CACHE_CONTROL, CACHE_1YR); server.sendHeader(HEADER_CONTENT_ENCODING, CONTENT_ENCODING_GZIP); server.send_P(200, MIME_JS, INDEX_JS, INDEX_JS_LEN); }