In addition to 'Cache-Control', the 'Expires' header would be a nice add. 'Expires' is more widely supported across browsers anyway.
If you want, I can fork and submit a pull request, but since it's such a small change, I wasn't sure.
Something like this might work:
var d = new Date().getTime() + maxAge;
res.setHeader('Expires', new Date(d).toUTCString() );
Added Expires header (max one year) for #410
My understanding about the Expires is that if a cached entry has a valid expiration date the browser can reuse the content without having to contact the server at all when a page or site is revisited. That is, no unused 304 responses....
Can you confirm if I'm right? Or I missed something?
@saich - that's correct. Thanks, @ryanrolds for pull request #416
@saich, the same applies to HTTP/1.1's version of Expires, Cache-Control. Expires is deprecated in favor of Cache-Control, which allows much more fine grained control of freshness and expiration.