I hope the request for all files have a header with Cache-Control: “no-cache”, only to .js/.css files have another value to Cache-Control → public, max-age=31536000
The second header didn’t work. I think that the path doesn’t accept regexp.
At the moment, I think your best bet is to put your CSS and JS assets in a subfolder (e.g. /js/foo.js, /css/bar.css, etc) and use those subfolders as the header directive’s base path.
The expires plugin can handle regex, but I don’t think it does Cache-Control specifically, just the literal Expires header.
What I understand is that ETag will help to update old files if there is a change in your resource file, so I won’t care to Cache-Control specific files, what I care is nobody mentioning about. ETag is built-in Caddy
I didn’t know what was ETAG, thank you so much!
Is ETAG for files HTML too?
My problem is with .html - I don’t want that browser storage html in cache.