cache-control icon indicating copy to clipboard operation
cache-control copied to clipboard

Should max-age have `=` in express?

Open webuniverseio opened this issue 5 years ago • 4 comments

Whey you use max-age, code that is generated in express shows following:

res.set('Cache-Control', 'max-age 86400');

shouldn't there be = instead of space, like so

res.set('Cache-Control', 'max-age=86400');

Thank you

webuniverseio avatar Apr 15 '19 18:04 webuniverseio

Yes appears you're right! Thanks for letting me know will fix asap.

sdgluck avatar Apr 17 '19 09:04 sdgluck

Still not fix yet?

abcfy2 avatar Dec 20 '21 03:12 abcfy2

I thought I was smart by using builder instead of writing my Cache-Control manually to avoid small typos and wasted time. But wasted a lot time because of this :laughing: In case it's not obvious, this isn't anything express specific, this tool simply does not output valid Cache-Control headers.

FINDarkside avatar Feb 15 '22 09:02 FINDarkside

Thanks for letting me know, and sorry about that @FINDarkside. I will take it down as I don't have time to maintain this anymore. All the best.

sdgluck avatar Feb 15 '22 10:02 sdgluck