Skip to content

Commit

Permalink
Merge pull request #3508 from Moustachauve/fix-settings-cache
Browse files Browse the repository at this point in the history
Fix settings caching on some browsers
  • Loading branch information
blazoncek committed Nov 17, 2023
2 parents 44726c7 + eca3fb1 commit a83d9a0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion wled00/wled_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,12 @@ void serveSettingsJS(AsyncWebServerRequest* request)
strcat_P(buf,PSTR("function GetV(){var d=document;"));
getSettingsJS(subPage, buf+strlen(buf)); // this may overflow by 35bytes!!!
strcat_P(buf,PSTR("}"));
request->send(200, "application/javascript", buf);

AsyncWebServerResponse *response;
response = request->beginResponse(200, "application/javascript", buf);
response->addHeader(F("Cache-Control"),"no-store");
response->addHeader(F("Expires"),"0");
request->send(response);
}


Expand Down

0 comments on commit a83d9a0

Please sign in to comment.