Favicon.ico or an icon in the address bar of the browser

    I immediately note that the article is from the category of "for the smallest." I’ll just forgive her, suddenly it will come in handy for someone.

    Favicon, what is it and what is it for? Favicon.ico is a shortcut file in Win32 OS which is an icon-link to the page of the site on which it is present. It can be seen in the selected links of your browser, the address bar, and on bookmarks in multi-window browsers. How to fasten it to the page? In order to draw an icon, you need to use any graphic editor, but after that you need to convert your received graphic file to .ico format or to draw it initially in specialized editors such as AWIcons Pro, IconWorkshop, MicroAngelo, etc. Just renaming the file extension to .ico is a bad idea, as some browsers will not accept such a file and will not display an icon. If you’re even more used to working in Photoshop, then hereYou can download the plugin for working with images in the .ico format. For the plugin to work, the file must be unpacked and saved in the Plug-Ins \ File Formats folder in the Photoshop root directory.

    So, we have an icon converted in the correct way to the .ico format. Further on the points.

    1. The name of the icon should be favicon.ico, because some older browsers will not be able to recognize it as a site shortcut.
    2. The connection of the icon to the document is carried out by the following code. You must specify the content type as image / x-icon and the link to the document as a shortcut icon. In addition to the fact that this is mandatory according to the w3c specification, there is a chance that you will again stumble on the features of some browsers without specifying the type of content.
    3. The size of the icon you can choose from 16x16 to 48x48, the larger the icon, the prettier it will be, in case the user decides to put a shortcut on your site on his desktop, for example. But! We live in a reality called “We All Love Internet Explorer”. I explain that icons larger than 16x16 px are simply ignored by IE 6.0 and below. However, it is possible to pack several images into one .ico file, both of different sizes and contents, use this opportunity.
    4. Where to place the file with the site icon? For reliability, just put it in the root directory of your site.

    Rake.

    1. As indicated above, IE lt 6.0 does not understand icons exceeding 16x16 pixels.
    2. IE 6.0 and below will display the icon only after adding the page to your favorites and reloading. Well, MS likes to restart everything and everything ;-).
    3. If IE 6.0 and below and after that does not display it, then try to clear the browser cache.
    4. If even after this the icon does not appear where it should be, it is necessary to make sure that your server sends the icon to the browser and displays it, and does not transfer it as a file and suggests that you save it. This can be verified by simply entering the address of your site and the name of the icon into the browser, for example yoursite.com/favicon.ico, provided, of course, that the icon lies in the root directory. In the second case, your server is not configured to display .ico files. In order to fix this situation, you need to create a .htaccess file in the root of the site and add the following AddType image / x-icon .ico line to it.

    Related links:

    1. How to add your own website icon to the address bar and to your browser bookmarks? www.htmlbook.ru/faq/?a=28
    2. Favicon - an icon in the address bar. lines.net.ua/index.php?loc=articles&category=webdesign&art=3
    3. Icon in the address bar. www.codenet.ru/webmast/favicon.php
    4. favicon.ru - favicon.ico generator and editor. favicon.ru

    Crosspost from webdev.lovata.com .

    Also popular now: