Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Two of 5 pages not showing favicon

Posted by: larry78723 Jun 27 2020, 04:51 PM

The website I'm developing on a local server has 5 pages. On three of the pages, favicon displays correctly. On the other two, it doesn't display. All the pages have the same code in the header
except for the css file, title, and meta description.

CODE
<head>
    <title>Foxclone Legal Terms</title>
    <meta name="description" content="This is free, open-source, software" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="content-type"" content="text/html" charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <link href="css/legal.css" rel="stylesheet" type="text/css" />
    <!-- Favicon  -->
    <link rel="icon" href="fox.ico" />

</head>


Does anyone have any idea what's going on?

Thanks in advance,
Larry

Posted by: CharlesEF Jun 27 2020, 10:17 PM

It looks to me like the link is incomplete. I write mine like this:

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

I have seen code samples with the link as you have it but I've no idea how well it works. Also, if you put the favicon in the root directory of your web site most modern browsers will use it. You don't need the link code for that but I like to put my icons in a separate directory so I use link code.

Posted by: pandy Jun 28 2020, 01:06 AM

So you have the same LINK in the header, but are all HTML files in the same directory? Or if they are in different directories have you placed a copy of the ico file in each one?

Posted by: larry78723 Jun 28 2020, 05:39 AM

QUOTE(pandy @ Jun 28 2020, 02:06 AM) *

So you have the same LINK in the header, but are all HTML files in the same directory? Or if they are in different directories have you placed a copy of the ico file in each one?


Pandy, all of the files are .php files, not html and are in the same folder along with the favicon.


EDIT: If I open the files that don't display the favicon in the server, as files in my browser, the favicon does display.

Posted by: pandy Jun 28 2020, 01:56 PM

Doesn't matter if what extension the pages have. Then I don't know, unless you have some error in the pages that don't work correctly.

Favicons used to behave erratically, but I think those days are gone?

Posted by: larry78723 Jun 29 2020, 04:47 PM

Problem solved!!!

After clearing the cache you need to restart the browser.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)