Merge pull request #3508 from Moustachauve/fix-settings-cache
Fix settings caching on some browsers
This commit is contained in:
@@ -579,7 +579,11 @@ void serveSettingsJS(AsyncWebServerRequest* request)
|
|||||||
DEBUG_PRINTF(PSTR(" bytes.\tString buffer usage: %4d of %d bytes\n"), strlen(buf)+1, SETTINGS_STACK_BUF_SIZE+37);
|
DEBUG_PRINTF(PSTR(" bytes.\tString buffer usage: %4d of %d bytes\n"), strlen(buf)+1, SETTINGS_STACK_BUF_SIZE+37);
|
||||||
#endif
|
#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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user