How to disable/not to send Last-Modified Header

bartzy nginx-forum at
Thu Jan 13 00:12:14 MSK 2011


Sorry for the bump, but this didn't fix the issue in my case.

I have static files that never change. I want to set future expires
header for them and to force the browser NOT to check if the cached
version is valid with if-modified-since conditional GET.

when I remove the Last-Modified header in nginx like Igor suggested,
Only the expires and cache-control (max-age...) get sent, but I think
the browser doesn't even save the resource in cache (tried with both IE8
and FF3.6).

This is my related configuration block:
location ~* \.(js|css|png|jpg|jpeg|gif|htc)$ {
   expires               max;
   add_header      Cache-Control public;


Posted at Nginx Forum:,62782,165708#msg-165708

More information about the nginx mailing list