How to disable/not to send Last-Modified Header

Maxim Dounin mdounin at mdounin.ru
Thu Jan 13 16:26:03 MSK 2011


Hello!

On Wed, Jan 12, 2011 at 04:12:14PM -0500, bartzy wrote:

> 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.

Short answer: you can't.

Long answer: browsers do whatever they want and can't be forced to 
not check cached resource.  Most of the checks may be avoided with 
"expires max;" directive, but not all.

> 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).

Igor never suggested to remove Last-Modified header, he just 
answered how to do it.  It's thread starter who thinks this will 
help.

Maxim Dounin



More information about the nginx mailing list