Log in

No account? Create an account
Zer Netmouse
April 25th, 2005
04:40 pm


Previous Entry Share Next Entry
Q: How do I make an icon for my website that will show up in the address bar?
A: This is called a FavIcon.

favicon.ico in the main directory,a 16x16, 16 or 256 colour Microsoft icon file

Mozilla/Firefox and most other supported browsers will start displaying the favicon on the browser address bar, the very first time you visit a web page that has a favicon (specified using the favicon HTML tag).

The file doesn't *have* to be named favicon.ico but it does let you tie into the way some browsers automatically look for that file. you can specify a file of any filename.ico with the link ref:

< LINK REL="shortcut icon" HREF="http://site/directory/filename.ico" >

Internet Explorer browsers (as of version 6.x) associate favicons with bookmarks. So you must first bookmark the web page. The favicon will appear on the browser address bar and on the Favorites menu, the second time you visit the bookmarked page. If the favicon doesn't appear even after bookmarking and revisiting the web page, restarting the browser may help.

is an online tool for making any image into a FavIcon.

(4 comments | Leave a comment)

[User Picture]
Date:April 25th, 2005 04:26 pm (UTC)
And I was wondering this very thing!

K. [wondering if I have to hand-code that into every page of my web site, once I create one]
[User Picture]
Date:April 25th, 2005 06:17 pm (UTC)
A lot of browsers will check for a file named favicon.ico so you don't have to use the html link ref unless you want to be comprehensive -firefox will apply it to your whole site, for example. The easiest way to add things like that to every page in your web site is to have a consistent header that has references like that and your stylesheets, for instance, which you include in each page. How you include that file depends on what you're using to write your web pages. it's very easy with PHP for example.

outside of one unfortunate use of the apostrophe, the discussion of PHP include on http://www.tizag.com/phpT/include.php is nicely to the point.
[User Picture]
Date:April 26th, 2005 12:57 pm (UTC)
I don't use stylesheets.

[User Picture]
Date:April 25th, 2005 06:35 pm (UTC)


Judging from the access logs on dd-b's server, it appears that it just has to exist at the root -- www.yourwebsite.com/favicon.ico -- and that's all you have to do. They say you're supposed to put <link rel="shortcut icon" href="favicon.ico"> in the header of your base HTML page, though. In any event, you just do it at the root and it takes effect for the lower-down pages.

We have all these "file not found" instances in the error_log because of it...
Netmouse on the web Powered by LiveJournal.com