Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

url icon

Status
Not open for further replies.

jdubz

Technical User
Apr 28, 2002
70
hey there,
i've added an icon (.ico) to my index page for my site:


using the following code between the <head>
<LINK REL="SHORTCUT ICON" HREF="
but would like to include it on all the pages within the site

what is the additional code needed? i've tried just adding " /pagename.htm" and then upload but it doesn't add it.

i learned this initially from the following thread:
thread253-53712

thanks!
jw
 
Rename the file to favicon.ico and place it in the root of the website, then you don't need any code added for it to work.

As for it showing, depending on your browser you may need to add the site to your favorites before the favicon will show.

Hope this helps

Wullie

Fresh Look - Quality Coldfusion 7/Windows Hosting
YetiHost - Coming Soon

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
i've tried both putting the link on to the each additional webpage but no luck. (if i'm doing it right by adding the "/newpage.htm/URLicon.ico" to the originall code.

then i tried renaming to favicon.ico but it still only appears on the first (index) page. but i want it on all the pages with in the site.

 
Then it's a browser issue. When you add a site to your favorites/visit the site (depending on the browser) the browser will request the favicon.ico file. If you add the code above to a page, you are simply telling the browser that it should not use favicon.ico but instead it should look in the location you provide.

Don't put too much effort into favicons as some browsers are weird with them, IE shows them for a while and then sometimes decides to just lose the file and starts to show the default IE one instead.

Hope this helps

Wullie

Fresh Look - Quality Coldfusion 7/Windows Hosting
YetiHost - Coming Soon

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Isn't that what we said?

You should, as Wullie said, be able to simply put the icon file in the root of your web directory and it will automagically be applied to each page.

If you use the <link> tag on every page, then the href attribute would be the path to the icon file.
You don't need to add /newpage.htm/URLicon.ico
You should quite simply put
Code:
<LINK REL="SHORTCUT ICON" HREF="[URL unfurl="true"]http://www.jdubz.com/URLicon.ico">[/URL]
into the head of each page of your site.

<honk>*:O)</honk>
Foamcow Heavy Industries - Web site design in Cheltenham and Gloucester
Ham and Jam - British & Commonwealth forces mod for Half Life 2
 
not exactly what you both said..

it was a combination of changing the file name and just having the basic code in the page.

i had tried the earlier but changing the file to Favicon.ico for some reason made the difference.

thanks again.
 
If you did what you said you did in this post :

i've tried both putting the link on to the each additional webpage but no luck. (if i'm doing it right by adding the "/newpage.htm/URLicon.ico" to the originall code.

Then that is why it didn't work. You were putting the page URL within the HREF attribute of the link tag. This meant that the page was trying to link to a file that wasn't there, the path didn't exist.

When you changed it to Favicon.ico, you referred to the file in the correct way. i.e. without the page URL in the path to the image.

trick was putting the code: <LINK REL="SHORTCUT ICON" HREF="

The file could have been called "banana.ico", the fact is you were writing the correct path to that icon file in the <link> tag.

<honk>*:O)</honk>
Foamcow Heavy Industries - Web site design in Cheltenham and Gloucester
Ham and Jam - British & Commonwealth forces mod for Half Life 2
 
banana.ico, eh?

09.gif
09.gif
09.gif
09.gif
09.gif

09.gif
09.gif
09.gif
09.gif
09.gif

09.gif
09.gif
09.gif
09.gif
09.gif

09.gif
09.gif
09.gif
09.gif
09.gif

09.gif
09.gif
09.gif
09.gif
09.gif


Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top