Jump to content

Archived

This topic is now archived and is closed to further replies.

rocdy

Any one know how to add favicon.ico in address bar?

Recommended Posts

Any one know how to add favicon.ico in address bar?

 

Any reply will be very appreciated.

Thank before.

 

Best regard

Rocdy


Rocdy

 

Beginner in php programming and still learning from this forums.

Special thanks for Oscommerce Community Forums that help me a lot. :-)

Share this post


Link to post
Share on other sites

As I understand it, if you put a 16px x 16px image called favicon.ico in your root directory it will show in the address bar, on tabs and in favorites/bookmarked

 

If you can't produce a favicon.ico image then you can do the following:

 

Put this code in the header of every page you want to show the icon:

<link REL="SHORTCUT ICON" HREF="http://MY_SITE.com/name.gif">

and the name.gif in the root directory

 

image should be 16 x 16 maximum

Share this post


Link to post
Share on other sites

As I understand it, if you put a 16px x 16px image called favicon.ico in your root directory it will show in the address bar, on tabs and in favorites/bookmarked

 

If you can't produce a favicon.ico image then you can do the following:

 

Put this code in the header of every page you want to show the icon:

<link REL="SHORTCUT ICON" HREF="http://MY_SITE.com/name.gif">

and the name.gif in the root directory

 

image should be 16 x 16 maximum

 

Thanks U, it's working.

 

I just find some contributions icon in address bar, it's the same way that you mention it. Thanks U

 

http://addons.oscommerce.com/info/3495


Rocdy

 

Beginner in php programming and still learning from this forums.

Special thanks for Oscommerce Community Forums that help me a lot. :-)

Share this post


Link to post
Share on other sites

well, the image need to be called favicon.ico and the link to is

<link rel="shortcut icon" href="/favicon.ico">

in the <head> section of the html

 

As to where to put it, I'm not sure. since I use sts, I put it into my default template + other "main templates". For regular osCommerce, I would try to put it into the header.php

 

EDIT: great that it works in the above way too, I didn't know

Share this post


Link to post
Share on other sites

To clarify this, a gif image will work but is not fully supported. The browsers look for favicon.ico automatically but that can be changed. The code for the favicon just needs to be in the index.php file and the favicon.ico image is usually placed in the root directory but can be placed elsewhere. There are many sites around that will allow you to upload some image you have and have it converted to the correct image, at no charge. All sites should add a favicon since it cuts down on server errors and bandwidth usage.

Share this post


Link to post
Share on other sites

for 2.3.1:

 

at the bottom of catalog/includes/header.php (after ?>)

 

add this

<link rel="shortcut icon" href="http://yoursitename.com/catalog/favicon.ico">

make sure the favicon.ico is located in catalog (or wherever you saved it to, which could also be in the root, yoursite.com, outside of catalog)


Web Developer, Firebug, and Notepad++ are powerful free tools for web design.

Share this post


Link to post
Share on other sites

If you are using favicon.ico which is 16 x 16 then there is no need to put anything in any of your files, it should be in your root directory though

Share this post


Link to post
Share on other sites

If you are using favicon.ico which is 16 x 16 then there is no need to put anything in any of your files, it should be in your root directory though

 

i think that's if the browser supports that feature so its a good idea to have the code in case some browser doesnt work like this.

Share this post


Link to post
Share on other sites

i think that's if the browser supports that feature so its a good idea to have the code in case some browser doesnt work like this.

 

You could be right there probably are some basic browsers that don't support it along with css as well :-" :-"

Share this post


Link to post
Share on other sites

@scot

 

 

The favicon.ico may take up to 3 days to show.

 

Also follow the way Erik M explane

 

for 2.3.1:

 

at the bottom of catalog/includes/header.php (after ?>)

 

<link rel="shortcut icon" href="http://yoursitename.com/catalog/favicon.ico">

Share this post


Link to post
Share on other sites

×