Welcome to WebmasterWorld Guest from 54.147.250.33

Forum Moderators: ocean10000

Content Type on IIS7.5

On IE it prompt to download file

   
1:57 pm on May 9, 2012 (gmt 0)

5+ Year Member



Hello

When i try to add Content-Type to IIS 7.5 to look like this:

Content-Type => text/html, charset=utf-8

It work fine with F, but IE will prompt to download the file!

Any idea why?

I also noticed some servers respond with a header showing:
Content-Type => text/html; charset=utf-8

While in my case semi colon is replaced with , like this

Content-Type => text/html, charset=utf-8

This is normal with IIS7.5?

Thanks in advance
2:05 pm on May 9, 2012 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



"text/html; charset=utf-8" is the correct form to use.

IE doesn't couldn't find a match on how to render "text/html, charset=utf-8" so it asks for you to download it.

I am assuming Firefox just ignores what it doesn't understand, or has a code path that handles this case.

When you added the content type you more then likely added it with a "," instead of ";"
2:16 pm on May 9, 2012 (gmt 0)

5+ Year Member



Hello Ocean10000

This is a fast useful response.

In fact I just add the content name and type via IIS7.5 IU.

and IIS produce the , with no control from my side!

Any idea why or how to fix it?

seems like i need to search for how to replace , with ; for IIS, since searching the problem the way i described in the post lead to no results!

Many thanks
3:30 pm on May 9, 2012 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Here is a little quick walk though I found on Microsoft Technet, on how to edit MIME Types.

Edit a MIME Type (IIS 7) [technet.microsoft.com]
3:39 pm on May 9, 2012 (gmt 0)

5+ Year Member



thanks again ocean,

In fact i thought of mime type, since i found no .php (my root document file) mime type.

I asked my host, they said php isn't handled by mimetype, its handled via handlers, and is added to be handled via fastcgi in our case.

I also made a try, added .php mimetype as text/html and nothing changed!

I spent hours searching the web, just one post talking about it on IIS forum with no resolution.

I replied back to host (who consider this outside their support scope) to see if they can help, they usually do if they have the info.

Will update this post with any new findings!

Thanks again
12:28 am on May 12, 2012 (gmt 0)

5+ Year Member



I get this when I havenít yet mapped the php on the website. On the IIS manager, right click on the website, > home directory > configuration > add the php.exe to the .php.

If they are providing php, then this is their issue.
2:38 pm on May 12, 2012 (gmt 0)

5+ Year Member



Hello Seb7

What configuration you mean? Im using IIS 7.5

In fact php is loaded and working without issues!
 

Featured Threads

Hot Threads This Week

Hot Threads This Month