Can I detect image request by HTTP headers?
Well,
I would like to know if it's possible to detect by HTTP headers if request comes from <img
tag.
I assume that when request is called from <img
tag, I'll not have */*
header in HTTP_ACCEPT or I'm missing something.
Regards
EDIT: I've tried with fe开发者_JS百科w browser but i can't conclude nothing by HTTP_ACCEPT...
No, sorry - a browser request made for an img
tag will be identical to any other GET request - though as you point out, Firefox does give an Accept
header specifying that it expects some kind of image but unless all browsers do this it's not very useful.
What's this for? There might be another way to do what you want.
精彩评论