Quantcast
Channel: Nginx Forum
Viewing all articles
Browse latest Browse all 53287

Re: Not logging access to favicon.ico

$
0
0
On 17 January 2013 22:53, Agus <agus.262@gmail.com> wrote:
> location is only available in server block. Though you could create a file
> with the location /favicon... and then include it in every server block
> which will save you typing.

I do this. I'm /sure/ I've seen some historic user-agents requesting
"favico.ico" or something like that, so I place it under a location of
just /favico.

Mik - you may find that a 204 is not what you want to return, as
browsers /may/ not cache such a 0-byte file for the favicon. I use
this, and include it in every server{} stanza:

location /favico {
access_log off;
error_log /dev/null crit;
empty_gif;
}

I'm fully aware it doesn't work on IE, due to IE only supporting
properly-formed Icon format files; fuck those guys.

Cheers,
Jonathan
--
Jonathan Matthews // Oxford, London, UK
http://www.jpluscplusm.com/contact.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 53287


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>