How to make empty_gif expire image immediately?

Dave Cheney dave at
Thu Oct 30 08:11:25 MSK 2008

> So is the idea here that you don't send any image? My concern with that
> the I would think that under some circumstances some browsers may try
> than once to get the image if it got a 204, which would then cause too
> hits to the log (throw off the tracking).

Why would they try twice? Only if the href was referenced more than once on
the page. A 204 is guarenteed by the RFC to be uncachable

> > I may try this out but I am still very interested to hear why the
expires 0
> does not seem to have an effect with empty_gif. Thanks.

exipres 0 means Expires: the current date

Which is probably subject to clock skew.


expires epoch;



>> try this
>> location = /files/beacon.gif {
>>     return 204;
>> }

More information about the nginx mailing list