Deny favicon request
I know if I create favicon and set appropriate expire headers browser wi开发者_运维知识库ll cache it and stop requesting it.
My question is how do I stop browser requesting favicon when there is no icon file for a limited time (i.e. 30 days)?
You cannot stop anyone from making any requests. You can only decide what to do with the requests you receive.
Nothing you do will stop me from opening a connection to port 80 on your server and asking for the favicon.
But if you are just talking about ordinary folk on common browsers, you should just give 'em a favicon so they stop asking. Make a white square or something, doesn't matter.
精彩评论