Nginx: conditional "expires" directive

Oleksandr V. Typlyns'kyi wangsamp at
Tue Aug 16 16:56:00 UTC 2011

Today Aug 16, 2011 at 12:13 somebi wrote:

> Getting two max-age headers in result. One with 1 year and second with
> 3600. ?no_cache=1 gives the same result.
> if ($arg_no_cache) { set $ccontrol "no-cache";} is ignored do not know

  It's because you specify expires directive too.
  Comment out expires and set "max-age=31536000" for 1 year.


More information about the nginx mailing list