Favicon.ico: Difference between revisions From Online Manual

Jump to: navigation, search
(Created page with "A favicon is the little image that is shown in a browser's bookmarks, address bar or tabs when displaying pages from a particular site. The default favicon is the favicon.ico fil...")
 
mNo edit summary
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
A favicon is the little image that is shown in a browser's bookmarks, address bar or tabs when displaying pages from a particular site. The default favicon is the favicon.ico file and one is supplied with the SMF installation.
A favicon is the little image that is shown in a browser's bookmarks, address bar or tabs when displaying pages from a particular site. The default favicon is a file named favicon.ico and one is supplied with the SMF installation. The standard dimensions of 16x16 or 32x32 can be used depending on your needs.


To change which file is used edit /Themes/default/index.template.php as follows:
Modern browsers will pick up that you have a favicon if it is placed on your site or forum root [main directory] without any code edits provided that the file is correctly named "favicon.ico".


Find <head> then add after:
Since modern browsers have image caching enabled by default, this could make the favicon.ico not show up in your browser until the cache is refreshed. This could take hours or days depending on the browser settings. Waiting a while for the image to show is a good idea before assuming that it did not work, since it is not shown as soon as it is uploaded.


echo '
 
<link rel="shortcut icon" href="favicon.ico" />';
[[Category:FAQ]]

Latest revision as of 11:11, 18 July 2015

A favicon is the little image that is shown in a browser's bookmarks, address bar or tabs when displaying pages from a particular site. The default favicon is a file named favicon.ico and one is supplied with the SMF installation. The standard dimensions of 16x16 or 32x32 can be used depending on your needs.

Modern browsers will pick up that you have a favicon if it is placed on your site or forum root [main directory] without any code edits provided that the file is correctly named "favicon.ico".

Since modern browsers have image caching enabled by default, this could make the favicon.ico not show up in your browser until the cache is refreshed. This could take hours or days depending on the browser settings. Waiting a while for the image to show is a good idea before assuming that it did not work, since it is not shown as soon as it is uploaded.



Advertisement: