Compare commits

...

8 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
db71cf3289 Remove unnecessary must-revalidate and _codeql gitignore entry
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
2025-11-28 06:12:11 +00:00
copilot-swe-agent[bot]
714a7f816c Change WEB_BUILD_TIME to UNIX timestamp integer for flash savings
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
2025-11-27 13:52:25 +00:00
copilot-swe-agent[bot]
0adfc17617 Change WEB_BUILD_TIME format to YYMMDD_hhmmss (UTC)
Co-authored-by: Aircoookie <21045690+Aircoookie@users.noreply.github.com>
2025-11-27 13:13:42 +00:00
copilot-swe-agent[bot]
54f650a0e9 Add WEB_BUILD_TIME to html_ui.h and use it for ETag generation
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
2025-11-27 13:00:02 +00:00
copilot-swe-agent[bot]
441bd62ad6 Remove CodeQL artifact and add to gitignore
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
2025-11-27 11:56:17 +00:00
copilot-swe-agent[bot]
2dfe09e1b5 Add must-revalidate to Cache-Control header for better cache invalidation
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
2025-11-27 11:55:55 +00:00
copilot-swe-agent[bot]
c9ac77a2b7 Add must-revalidate to Cache-Control header for better cache invalidation
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
2025-11-27 11:54:48 +00:00
copilot-swe-agent[bot]
9fcdfd976a Initial plan 2025-11-27 11:48:16 +00:00
2 changed files with 9 additions and 1 deletions

View File

@@ -38,6 +38,11 @@ const wledBanner = `
\t\t\x1b[36m build script for web UI
\x1b[0m`;
// Generate build timestamp as UNIX timestamp (seconds since epoch)
function generateBuildTime() {
return Math.floor(Date.now() / 1000);
}
const singleHeader = `/*
* Binary array for the Web UI.
* gzip is used for smaller size and improved speeds.
@@ -45,6 +50,9 @@ const singleHeader = `/*
* Please see https://kno.wled.ge/advanced/custom-features/#changing-web-ui
* to find out how to easily modify the web UI source!
*/
// Automatically generated build time for cache busting (UNIX timestamp)
#define WEB_BUILD_TIME ${generateBuildTime()}
`;

View File

@@ -67,7 +67,7 @@ static bool inLocalSubnet(const IPAddress &client) {
*/
static void generateEtag(char *etag, uint16_t eTagSuffix) {
sprintf_P(etag, PSTR("%7d-%02x-%04x"), VERSION, cacheInvalidate, eTagSuffix);
sprintf_P(etag, PSTR("%u-%02x-%04x"), WEB_BUILD_TIME, cacheInvalidate, eTagSuffix);
}
static void setStaticContentCacheHeaders(AsyncWebServerResponse *response, int code, uint16_t eTagSuffix = 0) {