I want to set a favicon to be requested from a static file server instead of the main web server for performance optimization.
If I specify a <link rel="shortcut icon" href="http://cdn.site.com/favicon.ico">
but also have a /favicon.ico
in my site root as a fallback, which will browsers prefer? Will browsers (and which?) still look for /favicon.ico
, making the move to a static file server useless?
I did the test suggested above. I placed a /favicon.ico in the root of a domain, and a link, and fired up the page in:
They all showed the icon loaded with <link rel="shortcut icon" href="http://cdn.site.com/favicon.ico">
(located on an external server). I checked access.log
, and there were no requests to /favicon.ico
!
I then commented out the <link>
, checked again in all browsers, and they showed the /favicon.ico
icon and corresponding entries in access.log
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With