Skip to content

Add Cache Control Header #999

Closed
Closed
@sticilface

Description

@sticilface

Regarding ESP8266WebServer:

When serving files from SPIFFS, have the option to add Cache Control Header. Having this option makes for example serving static javascript files much much better as the ESP does not have to continually serve up unchanged files.

    HTTP.sendHeader("Cache-Control"," max-age=xyz"); 

proposed implementation

  void serveStatic(const char* uri, fs::FS& fs, const char* path, uint32_t max-age);

Any thoughts for or against such an addition? I'm willing to / attempt to implement it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions