Suppose I want to add favicon to a dynamically generated page (specifically an ADF Faces page, but that doesn't matter). I cannot change the tag of my provided html. So I am trying to add the http header in the servlet header. I want my title to be identical to the headt HTML element:
<link rel="shortcut icon" href="http://foo.com/favicon.ico">
I add it like this:
httpResponse.addHeader("Link", "<http://foo.com/favicon.ico>; rel=\"shortcut icon\"");
And in my browser, I see this header in response:
Link: <http://foo.com/favicon.ico>; rel="shortcut icon"
But unfortunately, this has no effect in IE or Chrome. Has anyone tried to achieve the same? Am I doing something wrong? Should this work at all?
dragn
source share