Favicon.ico IE/DreamHost problem


#1

Hello,

I have a script that grabs the favicon.ico from a site and saves it to a local folder and then displays the favicon.ico next to the site link.

My problem is that only in IE when served from DreamHost the favicon.ico will not display!? Why is this?

The favicon will display in FF when served from localhost and DH.

The favicon will display in IE when served from localhost.

It is a really odd issue.

Any help, idea’s or insight would be greatly appreciated.

Thanks,
Jandal
=-)


#2

Can you provide a link to the script running on DreamHost where the problem can be experienced?

–rlparker


#3

Hi,

On the right side you will see my
"Profile Links"
That is where the .ico files should be. You will need to view it in FF and IE.

Thanks,
=-)


#4

Internet Explorer is unable to display a .ico file in the main browser window. Your best bet is to convert the file into a format IE can understand before attempting to display it.

si-blog
Max discount on any plan with promocode SCJESSEYTOTAL


#5

Wow… this is a strange one. I’ll have to admit I spent “way” more time doinking about with this trying to figure out what is happening than I wanted to, or should have had to, because the more I looked at it the more infuriating it became because of the inconsistencies.

To see what I mean, check out these urls in FF and IE7:

http://maddogz.com/wwwyoutubecom.ico
[color=#CC0000]The icon is displayed in both FF and IE[/color]
Server: Apache/1.3.37 (Unix) mod_throttle/3.1.2 DAV/1.0.3 mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a PHP/4.4.8 mod_ssl/2.8.22 OpenSSL/0.9.7e
Last-Modified: Wed, 16 Apr 2008 11:25:50 GMT
Etag: "73a75c1-47e-4805e23e"
Accept-Ranges: bytes
Content-Length: 1150
[color=#CC0000]Content-Type: image/x-icon[/color]

http://www.jamesturner.co.nz/wp-content/plugins/profilelinks/favicons/wwwyoutubecom.ico
[color=#CC0000]The icon is displayed in FF but is NOT displayed in iE7[/color]
Server: Apache/2.0.61 (Unix) PHP/4.4.7 mod_ssl/2.0.61 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.4.2
Last-Modified: Tue, 15 Apr 2008 02:21:36 GMT
Etag: "4fde19f-47e-f42ac00"
Accept-Ranges: bytes
Content-Length: 1150
Content-Type: image/vnd.microsoft.icon

http://rlparker.freeshell.org/wwwyoutubecom.ico
[color=#CC0000]FF offers to download/save, but IE7 displays the icon[/color]
Server: Apache/1.3.37 (Unix)
X-Powered-By: PHP/5.2.5
Keep-Alive: timeout=15, max=59
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/plain

Just for giggles, I went and added the Content-Type: image/vnd.microsoft.icon to my server’s mime types on maddogz.com (per the information on http://wiki.dreamhost.com/MIME_Types) and anybody want to guess what happened? When visiting the first link above, FF displayed the icon fine, but IE7 refused to display it.

As silly as it sounds, it actually looks to me that the most problematic arrangement is IE7 being served the image/vnd.microsoft.icon mime type … go figure. :open_mouth:

There may be different mime types registered on different DH servers, (we don’t have sufficient permissions to read the mime.types files, and I don’t know if the wiki article referenced above is authoritative, current, or true for all the servers) so it may take a support request to find out exactly what is installed on your server.

That said, if YOU added that image/vnd.microsoft.icon mime type via an AddType directive in your .htaccess file, you can probably get things working as you expect them to by removing it. If, however, DH has that in your server’s mime.types file , you can try “over-riding” it by placing:

AddType image/x-icon ico

in an .htaccess file in your home directory (or even in the directory with your .ico files); it might give you a workaround for the IE borkedness.

sigh… why is it that everything Micro$oft “does” on the web (the “.ico dance” being one example!) is inherently farked-up at birth? ARGUGGGH! Interesting reading to be found at http://en.wikipedia.org/wiki/Favicon

–rlparker


#6

Actually, you can get it to display, but you have to dork around with it and pass a “catch-all” mime type, as IntarWeb ExPloder won’t display the .ico in the main browser window using the “proper” mime type (though it’s hard to see any mime type with the work “microsoft” in it could be considered “proper” by civilized people).

And I agree completely that it would be better to do it that way. :slight_smile:

–rlparker


#7

WOW! Awesome work rlparker!

Thanks for the knowledge, I hadn’t considered checking the mime types at all.

Yeah, good old M$ aye, the problem is too many people visit my site with IE and I can’t just say stuff you all :wink: I need one of those Get FF plugins!

I have looked at a couple of classes to convert the ico to image but they all required me to make them use curl as DreamHost has disabled the PHP option allow_url_fopen.

That was looking at being more of a head banging exercise than asking why it wouldn’t display. Poor old rlparker though ended up doing plenty of head banging by the sound of it.

Thanks heaps for the time and input. I will have a play around and see what comes out of the wood work.

Jandal
=-)


#8

Thats interesting, because IE 7 displays my ico file just fine.
Icon file
Now that I think of it, I wonder if the cache has any effect over it.
Silk

My website


#9

Yep, just like the example I posted earlier in the thread, your DH server is serving it as mime type image/x-icon: [code]Response Headers - http://www.silkrooster.com/favicon.ico

Date: Thu, 17 Apr 2008 02:07:25 GMT
Server: Apache/1.3.37 (Unix) mod_throttle/3.1.2 DAV/1.0.3 mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a PHP/4.4.8 mod_ssl/2.8.22 OpenSSL/0.9.7e
Last-Modified: Tue, 15 Feb 2005 00:00:29 GMT
Etag: "11a79c-57e-42113b9d"
Accept-Ranges: bytes
Content-Length: 1406
Content-Type: image/x-icon

200 OK[/code]It is the servers that are serving it as content type image/vnd.microsoft.icon that present the problem (like James Turner’s)

–rlparker