nginx 0.8.53/0.7.67 unable to return 304

Maxim Dounin mdounin at
Wed Nov 10 03:07:58 MSK 2010


On Tue, Nov 09, 2010 at 05:22:04PM -0500, rchen9012 wrote:

> need help with nginx configuration,  I had configured a very simple
> static file caching or direct from disk, but nginx did not return 304
> when if-modified-since header is in the request.
> if-modified-since exact;

Just a side note: there is no such directive; there is 
if_modified_since one.

>         location / {
>             root   /www;
>             index  index.php index.html index.htm;
>             expires 1d;
>         }

The basic question is: how did you test?

Hint: never trust browsers and various "http headers" plugins, in 
many cache-related cases they show incorrect info.  Looking what 
happens on the wire (tcpdump, wireshark) or at least intercepting 
traffic with debugging proxy (fiddler) is recommended.

Maxim Dounin

More information about the nginx mailing list