/    Sign up×
Community /Pin to ProfileBookmark

Favicon for local html document?

Hi all,

I have a local html file and I want it to display its own icon in the titlebar and Windows Taskbar.

So far I’ve tried relative and absolute paths, but nothing seems to work. The page keeps using IE’s default icon for .htm files.

Here’s what I’ve tried:

[CODE]<LINK REL=”SHORTCUT ICON” HREF=”favicon.ico”>
<LINK REL=”SHORTCUT ICON” HREF=”file:///G:/FILES,%20Work/Contacts%20List/favicon.ico”>
<LINK REL=”SHORTCUT ICON” HREF=”file:///G:FILES, WorkContacts Listfavicon.ico”>[/CODE]

The above code is in the <head></head> section.
The path of the html file is: “G:FILES, WorkContacts Listcontacts.htm”
The icon is 16×16 @ 16 colors.

Thanks!

to post a comment
HTML

11 Comments(s)

Copy linkTweet thisAlerts:
@KDLAJul 31.2006 — If you regularly clear your cache, your icons will be deleted too. Also, some servers don't allow favicons to work.

KDLA
Copy linkTweet thisAlerts:
@coyotewrwauthorJul 31.2006 — Thanks ?, but that doesn't really answer my question. I'm asking if it's possible to have a favicon for a *local* html file. Currently it isn't displaying whether I clear the cache or not.
Copy linkTweet thisAlerts:
@wh666-666Jul 31.2006 — One of my hosts even though i put in the correct code said fav icons took 3 weeks or so before showing up, you may have to wait depending on your host
Copy linkTweet thisAlerts:
@WebJoelJul 31.2006 — Yes you can. I have multiple sites that I built and maintain and I keep exact duplicates of them on my computer, and they all show their respective favicon in the menubar when viewing the page.

How did yo generate your favicon? Did you use a favicon generator or did you do it yourself by merely renaming a image file.

It is easist if the favicon.ico file is kept in a folder that stays with the html, that way if you move the folder that contains the html, everything goes with it. The absolute paths that you cited make me think that this is part of the problem. All my favicon image are accessed with <LINK REL="SHORTCUT ICON" HREF="favicon.ico"> or at least, <LINK REL="SHORTCUT ICON" HREF="[B]images/[/B]favicon.ico">
Copy linkTweet thisAlerts:
@coyotewrwauthorAug 01.2006 — Yes you can. I have multiple sites that I built and maintain and I keep exact duplicates of them on my computer, and they all show their respective favicon in the menubar when viewing the page.[/QUOTE]
Thank you WebJoel, this is exactly what I'm trying to accomplish.

How did yo generate your favicon? Did you use a favicon generator or did you do it yourself by merely renaming a image file.[/QUOTE]
I created a 16x16 icon @ 16 colors using Axialis IconWorkshop, saving it as "favicon.ico". There are no other sizes in this icon (48x48, etc.) Maybe IconWorkshop didn't correctly format the icon?

It is easist if the favicon.ico file is kept in a folder that stays with the html, that way if you move the folder that contains the html, everything goes with it.[/QUOTE]
Yes, the icon is in the same folder as the .htm file. Here are the paths:

G:FILES, WorkContacts Listcontacts.htm

G:FILES, WorkContacts Listfavicon.ico

The absolute paths that you cited make me think that this is part of the problem. All my favicon image are accessed with <LINK REL="SHORTCUT ICON" HREF="favicon.ico"> or at least, <LINK REL="SHORTCUT ICON" HREF="[B]images/[/B]favicon.ico">[/QUOTE]
The contacts.htm file contains the following in the <head> section:

<LINK REL="SHORTCUT ICON" HREF="favicon.ico">

I only tried the absolute paths when the above didn't work. I'm using the same code as you, so I'm not sure why it's not working. Any ideas?

Thanks!
Copy linkTweet thisAlerts:
@jmacwaNov 04.2006 — This has been an issue for me for quite some time, and I am interested to see if you ever got this to work properly.

Thanks

jmac
Copy linkTweet thisAlerts:
@coyotewrwauthorNov 11.2006 — Well, from what I read in various sites, it seems the favicon feature is very limited, only showing in the Links toolbar, some menus, etc. I couldn't find any way to make it work in the Taskbar... o_O
Copy linkTweet thisAlerts:
@yitzleNov 12.2006 — Did you get it sorted out? (Other than task bar)
Copy linkTweet thisAlerts:
@sillysara495Nov 15.2006 — Question, this is going to sound really stupid but what is a Local HTML file? is that when you just view it on your computer and it isn't on the actual internet? I'm doing a project for my web design class and this thread answers my problem if i'm correct in what a Local HTML file is.
Copy linkTweet thisAlerts:
@yitzleNov 15.2006 — You are ?

The term 'local' is used as in a 'local file' meaning a file found on your network or PC (not sure which).

So a local HTML file would be an HTML file found not on the Internet.
Copy linkTweet thisAlerts:
@naina28Jul 05.2019 — You have to do nothing just first take any jpg file that want to use as favico and use any favico convertor to covert that file into .ico file(make sure to set image size to 16x16pixels). After that put that file in same folder or image folder as you wish and name it(like I named fav).

After that use the meta tag in head section like this

<link rel="short icon" href="fav.ico"> if image is in same folder OR

<link rel="short icon" href="image/fav.ico"> if image is in image folder

Make sure value of href attribute must be same as name of favico file followed by .ico extension.

Hope you find this reply useful.
×

Success!

Help @coyotewrw spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.8,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...