Current time: 04-06-2020, 04:53 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
favicon content type
11-17-2011, 10:00 AM
Post: #1
favicon content type
I asked my developer to add to the .htaccess file the following line under <IfModule mod_expires.c>
ExpiresByType image/ico "access plus 1 years" to set an expire date for the favicon
But it didn't have an expire date, couldn't figure it out till I loaded the icon in Firefox and noticed this part of the response headers
Quote:Content-Type: text/plain; charset=WINDOWS-1251
strange, no?
I downloaded the favicon, uploaded on a different site and everything was fine, can you help me understand what the issue here isHuh

Thanks much
Visit this user's website Find all posts by this user
Quote this message in a reply
11-17-2011, 11:13 AM
Post: #2
RE: favicon content type
You should be able to add

Code:
<IfModule mod_mime.c>
    AddType image/ico .ico
</IfModule>

to get Apache to set the correct mime type for the favicon.
Visit this user's website Find all posts by this user
Quote this message in a reply
11-22-2011, 07:02 AM
Post: #3
RE: favicon content type
Google uses: "Content-Type: image/x-icon". Me too.

While correct type is "image/vnd.microsoft.icon". More reading:
http://en.wikipedia.org/wiki/ICO_(file_f...#MIME_type
Find all posts by this user
Quote this message in a reply
11-22-2011, 10:32 AM
Post: #4
RE: favicon content type
(11-17-2011 11:13 AM)pmeenan Wrote:  You should be able to add

Code:
<IfModule mod_mime.c>
    AddType image/ico .ico
</IfModule>

to get Apache to set the correct mime type for the favicon.

it didn't do the job, no idea why (worked on a test site though), and why is it served as wrong file type in first place?
Visit this user's website Find all posts by this user
Quote this message in a reply
11-29-2011, 04:38 AM
Post: #5
RE: favicon content type
whats interesting here is that when I add the <IfModule mod_mime.c> in a .htaccess of a subfolder it does work (but I don't want to work with htaccess on subfolders)
any idea? does it matter in which order it's entered in the .htaccess file? on the subfolder I had only this one line
Code:
<IfModule mod_mime.c>
    AddType image/ico .ico
</IfModule>
so maybe other parts of the htaccess is conflicting this one?
Visit this user's website Find all posts by this user
Quote this message in a reply
01-12-2012, 07:41 AM
Post: #6
RE: favicon content type
We moved to a different hosting (for other reasons) and the favicon is now fine!
Visit this user's website Find all posts by this user
Quote this message in a reply
01-15-2012, 03:31 AM
Post: #7
RE: favicon content type
(11-22-2011 07:02 AM)laboot Wrote:  Google uses: "Content-Type: image/x-icon". Me too.

While correct type is "image/vnd.microsoft.icon". More reading:
http://en.wikipedia.org/wiki/ICO_(file_f...#MIME_type

+1 for Content-Type: image/x-icon
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)