Reputation: 2960
Are there any restrictions on naming the favorites icon (favicon) file as anything other than favicon.ico?
I know for sure that it can be named anything, as long as the favicon tag refers to the correct file name.
For example:
<link href="/somefile.ico" type="image/x-icon" rel="icon" />
<link href="/somefile.ico" type="image/x-icon" rel="shortcut icon" />
The code above works just fine in displaying the icon.
What I want to know is does this violate any W3C/HTML specifications or this is permitted usage?
Upvotes: 11
Views: 6846
Reputation: 24232
According to W3C, the preferred method is to actually specify the favicon in the html document rather than relying on favicon.ico in the server root.
Upvotes: 17