Forums / General Questions / Favicon not showing up

Favicon not showing up

Views: 1,501

Results 1 to 15 of 15
11 May 2016, 2:28 PM
#1
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

Favicon not showing up

Hello:

I've placed my favicon in the root of my website but it is not showing up. I've cleared my cache but it still is a no show. I don't get it. Any ideas?

https://www.mygiftsite.com

Thanks much,

Silver

11 May 2016, 2:43 PM
#3
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

Re: Favicon not showing up

Design75:

I've had it installed for a long time. I just noticed that it wasn't there. I'm glad that someone can at least see it. Just wondering why I can't? I use Firefox and IE.

Thanks,

Silver

11 May 2016, 3:17 PM
#4
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,969
Plugin Contributions:
8

Re: Favicon not showing up

favicons always tend to be a pain. i'm not sure why. i had a client where we recently changed the favicon, and in no time the new favicon was up there. other times, i remember giving up and just waiting to the new favicon to magically appear... go figure...

you can try adding the following code into your header, and it can force the browser to reload the favicon:

<link rel="icon" href="http://www.mygiftsite.com/favicon.ico?v=2" />

good luck!

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

11 May 2016, 3:43 PM
#5
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

Re: Favicon not showing up

carlwhat:

Thanks, I'll give it a try!

Silver

11 May 2016, 3:53 PM
#6
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

Re: Favicon not showing up

carlwhat:

I gave it a try and it broke the site so I reverted back. Don't know if I did something wrong. Just added it to the bottom of the header.php file???

Silver

11 May 2016, 4:05 PM
#7
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,969
Plugin Contributions:
8

Re: Favicon not showing up

silver,
there are MANY header.php files.

you need to add it into this file:

/includes/templates/responsive_sheffield_blue/common/html_header.php

i have not used your addon template, but you can add it anywhere after you see the:

<head>

line and before the

</head>

line.

ensure that you add the line where the code is writing html and NOT php.

good luck!

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

11 May 2016, 4:21 PM
#8
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

Re: Favicon not showing up

Carl:

You're right. Had the wrong one. I'll let you know how it turns out. Man, there's a lot to learn!

Silver

11 May 2016, 4:31 PM
#9
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

Re: Favicon not showing up

Carl:

That did it. Thanks so much. That little white and red gift box showed up just like it is supposed to. It looks great!! I'm going to keep this little tid bit on file in case I ever need it again. :clap:

Thanks again,

Silver

11 May 2016, 6:07 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Favicon not showing up

FYI, the default template already has code in it to specify the favicon URL. I wouldn't recommend adding it into the <head> twice; instead just edit the existing one if you need to force a version-number change like shown above.

But, if your addon template doesn't include the favicon support, then ya you'll have to fill in whatever they forgot to include.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

11 May 2016, 6:50 PM
#11
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

Re: Favicon not showing up

Dr.Byte:

This is the only code that I could find in html_header.php and the favicon was not showing up prior to adding the additional:

<?php if (defined('FAVICON')) { ?>
<link rel="icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
<?php } //endif FAVICON ?>

Silver

11 May 2016, 7:27 PM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Favicon not showing up

Right. So that means it would have been telling it to show, but your browser had cached an old/broken/empty one. So the "change"/suggestion by carlwhat of adding ?v=2 to the end of the name simply breaks it out of the cache in your browser (which you could have fixed by emptying your browser's cache/history fully, too).

More at: https://www.zen-cart.com/content.php?94-using-favicon

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

11 May 2016, 8:00 PM
#13
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

Re: Favicon not showing up

I beg to differ with you but I had already done that becuase I had just installed an SSL cert on my website and that is one of the things I do routinely anyway, when I have a situation like this. Oh well, all is good!

Thanks,

Silver

12 May 2016, 12:38 AM
#14
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,969
Plugin Contributions:
8

Re: Favicon not showing up

in my experience, there are times when emptying the cache does not reset the favicon. i can not say which browsers honor it or not; or whether it was my user error which informed my experience (another distinct possibility). but as silver originally stated, he had tried clearing his cache in his OP.

in addition, while i have NOT downloaded his specific template, but i DID look at his site and there was no link tag for the favicon, hence my "dirty" solution which resolved his problem, and did NOT put a second link tag.

in looking at your code above, and based on what i saw on your site, silver, you have not defined FAVICON in your ZC install which is why there was no tag. which in most cases is unnecessary if you are using the default file name for your favicon; which you are.

at this point, you can safely delete the line you added this morning, and if you want, add this line to the language meta_tags.php as dictated in the link drByte sent.

define('FAVICON', 'favicon.ico');

minor sort of issues, perhaps some housecleaning, but in end up to you what you want to do.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

12 May 2016, 2:00 AM
#15
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

Re: Favicon not showing up

Ok Guys,

I understand more now but I will have to take care of this in the morning. I'm pretty much shot for the day. Thanks to both of you for your input. I really do appreciate it. I will let you know. Knowledge is Golden!!

Goodnight,

Silver