How to make empty_gif expire image immediately?

Rt Ibmer rtibmx at yahoo.com
Thu Oct 30 06:28:06 MSK 2008


Hi,

I'm using empty_gif to make a request to a log file for tracking purposes (as a beacon).  How can I configure nginx so that the browser is instructed to expire the image immediate (or just to not cache it to begin with).

I tried this:

        location /files/beacon.gif {
                access_log /tracking.log main;
                expires 0;
                empty_gif;
        }

However when I look at the browser internals for the empty gif it is marked to expire in 1 day instead of 0.  For instance my http analyzer shows the image is set to expire on October 30, 2008 which is one day from now. What am I missing? Thanks!




      






More information about the nginx mailing list