Why isn't my favicon working? [closed] - favicon

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 14 years ago.
Improve this question
Now I know there are a lot of similar questions around SO but I think I've covered all the basics. Here's what I know:
My favicon is accessible through /favicon.ico (full link)
The HTML is (page URL):
<link rel="icon" href="http://www.bandcmotors.co.uk/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="http://www.bandcmotors.co.uk/favicon.ico" type="image/x-icon" />
I've tried relative and absolute versions too. No love.
The HTTP response headers:
Date: Mon, 22 Dec 2008 15:07:34 GMT
Server: Cherokee
Etag: 494bc264=57e
Last-Modified: Fri, 19 Dec 2008 15:48:52 GMT
Content-Type: image/x-icon
Content-Length: 1406
200 OK
The icon loads fine in a browser and I've cleared my cache but I still can't see the icon in the address bar or tab. On either Firefox or IE.
What on earth am I doing wrong?
Edit 1. I used a validator and it rather helpfully told me that it could not download it. Rather odd considering I can download it fine... If anybody could explain that, it might help fix the problem.
Edit 2. I just drop-kicked my computer, restarted and it all worked. I hate caches that refuse to clear themselves properly ****grumbles**** >=(

Have you tried using a gif or png? The W3C documentation cites the following:
However, the format for the image you have chosen must be 16x16 pixels or 32x32 pixels, using either 8-bit or 24-bit colors. The format of the image must be one of PNG (a W3C standard), GIF, or ICO
Does your image conform? Have you tried using other favicons?

it works fine, your browser is probably caching it for some reason.
Btw., ETags are not recommended in such situations, better just use an "Expires: " header ...

It works fine in my safari browser, even in windows... ;)

Have you tried using the relative path to the icon, not the full "http://...." address? For example:
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
Another suggestion would be removing the type attribute:
<link rel="shortcut icon" href="/favicon.ico" />
I can see it in Firefox and Opera too, as is.

It may be an issue with your hosting provider (if applicable). GoDaddy & other popular hosting providers cache certain details & refresh your "virtual server" about once per hour.

Related

Badly displayed accented characters

On a CMS TYPO3 website I created 15-20 years ago and have been updating regularly, a few days ago, noticed a new problem: that the accented characters were all displayed badly. I hadn't changed or updated anything for a few weeks. How do I get it back to how it was?
That sounds like a bad UTF-8 encoding of your database.
Normaly this should have been detected and cleared some years ago when TYPO3 switched over to UTF-8 connections in general. Up to then it was possible to use the database in any encoding and force UTF-8 usage in the connection. in this way UTF-8 characters were stored in e.g. iso-latin fields. one missing forced usage and you ended up with a scrambled page. especially if you transfered the data with a dump you could destroy your data.
As this should have been happened years ago, another problem could have occured:
Maybe your (updated?) browser can't decide which encoding your site is using and guessed wrong.
Maybe you need to provide a proper encoding information in your HTML output.
ADD:
A proper encoding information may look like <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> or just <meta charset="utf-8"> as meta information in the HTML header.
Normaly such a header is sent by TYPO3 by default.

Github... Background image doesn't display when I publish my site on github

I'm a beginner in web Dev.. I have a website that displays properly on localhost but when I publish and try to render it on Github, the background image doesn't show up.. What can I do to remedy this
Can you post a bit of code for us to look at?
My guess is that you have the background image referenced absolutely on the computer, and it needs to be a relative reference to render when hosted online, but I can't say for sure without having some code to look at.
A link to your github project would also help.
Edit: It looks like you perhaps renamed your startup.css to style.css and forgot to edit the html header link from startup.css, to style.css
I.e. change
<link rel="stylesheet" type="text/css" href="startup.css">
to
<link rel="stylesheet" type="text/css" href="style.css">
Previous suggestion (no longer likely):
As you mention Windows, one possibility is that you have mixed up Capital and small letters somewhere in the filename or path.
Simple web-servers on Windows are often forgiving (as is Windows filesystem) of these mistakes, while internet is not-

I made a new favicon, but whenever i enter in the code from my old website, it immediately goes back to the old one

I was having a problem with my favicon previously, (here is my old favicon http://imgur.com/a/cATBc) (if you cant see it, it is a tiny blue dot in the corner of the screen)
But now, whenever I enter even a snippet of my old code, it immediately goes back to that favicon, even though I deleted all traces of it from my computer and GitHub.
My new favicon is a pug face.
Edit: ANY new website I make now has the old favicon.
Any help?
NEW EDIT: my website files are here: https://github.com/Pugplays42/htmlstuff
Check out the favicon-cheat-sheet from Audrey Roy Greenfeld.
Especially the "Forcing a Favicon Refresh" section:
Clear the browser cache on Windows (Ctrl+F5 or Ctrl+Shift+R) and on Mac (Command + Shift + R).
Also close and reopen browser if IE.
If still stuck, try opening new tab. Or see this question
Temporarily add explicit HTML markup and append a query string. Remove this when you're done:
<link rel="shortcut icon" href="http://www.yoursite.com/favicon.ico?v=2" />
<link rel="icon" sizes="16x16 32x32" href="/favicon.ico?v=2">
For large versioned deployments, if all site visitors need their favicon force-refreshed in an extreme situation:
Add explicit HTML markup (customize the sizes part) and put your version number in the filename.
<link rel="shortcut icon" href="/favicon-v2.ico" />
<link rel="icon" sizes="16x16 32x32" href="/favicon-v2.ico">

Why does not browser support unicode characters typed in netbeans?

I am using netbeans 7.4 for PHP programming. I have a web form and need to insert a non-English language (Sinhalese)to the interface. I have installed various fonts of this language in my PC and my browser (firefox) renders these fonts properly, because I have viewed local websites using the browser.
Netbeans shows this font as squares and when I run it in the browser something like this කොහොමà·à¶ºà·’is displayed. (Not squares). What is the reason for this? I really do not want to netbeans to show those characters. If the browser can render them, that would be enough.
Answering my own question :)
If you want to display unicode in your browser, you have to include below meta under <head> tag of your html part. Otherwise it won't render non-English content. This worked for me, but netbeans still shows squares for non-English context. I don't mind it since I am using non-english only for user interfaces
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Hope this will help a future reader

Jasper Report html output Image shows cached image in IE and Firefox but works all fine in Chrome

I have produced a jasper report in my application (JSF1.2,RichFaces 3.3.3,Portlet bridge), but I am facing a problem. The image produced by jasper is not changing dynamically even by rerendering its area. After a lot of discussions and analysis I have concluded that because the jasper provides image(new and old) with the same name... Hence the browser is not loading this image again and getting this image from the cache. I have also added the following code in the head section of the xhtml(portlet), but the result is still not changed.
<meta http-equiv="Cache-Control" content="no-cache"/>
<meta http-equiv="Cache-Control" content="no-store"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="-1"/>
Please let me know if someone has a solution for this.
This is the issue with image caching with Jasper
Here is the code
Just pass the random value along with image params
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI,
"image?random="+Math.random()+"&image=");
if the whole report is an image you can tray this hack
<img src="/yourpath/imagename.png?{put_current_time_here or some random string}" />