Skip to content

Commit

Permalink
Merge pull request Aircoookie#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 authored and softhack007 committed Nov 27, 2023
1 parent ca3708e commit bd889a4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions wled00/wled_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,12 @@ void serveSettingsJS(AsyncWebServerRequest* request)
DEBUG_PRINTF("%s min free stack %d\n", pcTaskGetTaskName(NULL), uxTaskGetStackHighWaterMark(NULL)); //WLEDMM
DEBUG_PRINTF(PSTR(" bytes.\tString buffer usage: %4d of %d bytes\n"), strlen(buf)+1, SETTINGS_STACK_BUF_SIZE+37);
#endif

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 bd889a4

Please sign in to comment.