Asp.net Mvc: why is browser looking for favicon.ico

后端 未结 4 2106
面向向阳花
面向向阳花 2021-02-13 17:54

I know there is a solution to stop the mvc framework to process \"favicon.ico\" requests (solution), but i don\'t know why is it looking for this icon in the first place.

<
4条回答
  •  一整个雨季
    2021-02-13 18:33

    favicon.ico is a convention - but is one way that the browser can get the image for links, tabs, etc:

    enter image description here

    Note that these days, the image location can also be set in metadata (which is handy as it allows the image to be per-page rather than per-domain, and/or allows for serving it from a different location, such as a CDN):

    
    
    

    However, "/favicon.ico" is the fallback, and is used by many old browsers - or where no explicit shortcut icon is specified.

    Basically: go create one.

提交回复
热议问题