| SillyDog701 Forums |
| Author |
Message |
Don_HH2K


Joined: 09 May 2004 Posts: 4745
|
05 Nov, 2004 9:22 pm XHTML and Internet Explorer? |
[sdp=47220] |
|
OK, this is puzzling me now. I recently converted my website to XHTML to avoid the Angelfire ads. It looks great in Netscape. I decided to test it in Internet Explorer, but IE decided not to read it and say that "the website was trying to download harmful content to my computer". After clicking "Download File" to override, the page opened up in Netscape anyway. I was under the impression that Internet Explorer had XHTML support in versions 6+, am I correct? Is this just a problem with my computer, or what? Any suggestions would be appreciated.
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
Laptop: Turion 64 X2 @ 2GHz, 2GB DDR2-667, 100GB HD, ATI Radeon X300, 15" LCD, Seven Ultimate RC |
|
| Back to top |
|
 |
Al


Joined: 20 Dec 2002 Posts: 1696
|
05 Nov, 2004 10:22 pm |
[sdp=47222] |
|
i think it's only partial
UserAgent: Mozilla/5.0 (Windows; U; Win98; rv:1.7.3) Gecko/20041001 Firefox/0.10.1 (Pikachu90000's Mozilla Firefox/0.10.1 rebrand)
User of Firefox 3.0 on Windows XP |
|
| Back to top |
|
 |
Shark Daddy


Joined: 19 Jun 2002 Posts: 518 Location: Toronto, Canada
|
08 Nov, 2004 1:46 am |
[sdp=47308] |
|
You need to stop serving it as application/xhtml+xml and you need to put the file extension back to .html (besides... nobody uses .xhtml). It's a famous shortcoming of IE with XHTML.
If you have the means, give non-IE browsers the correct MIME type and baby IE. For example, I use this PHP on a few websites of mine:
| Code: | if(stristr($_SERVER['HTTP_ACCEPT'],"application/xhtml+xml")) {
header("Content-type: application/xhtml+xml");
} else {
header("Content-type: text/html");
}
|
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 |
|
| Back to top |
|
 |
Don_HH2K


Joined: 09 May 2004 Posts: 4745
|
08 Nov, 2004 3:14 pm |
[sdp=47318] |
|
OK, I now see what needs to be done. The only problem is, the reason I converted to XHTML was to bypass the Angelfire ad code that is applied to all files with an HTML extension (has nothing to do with the MIME type, already checked that). I will use the PHP script that you gave me to get it to work properly. But, since IE guesses the MIME type and will receive text/html, would it be possible to use .xml as an extension instead?
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
Laptop: Turion 64 X2 @ 2GHz, 2GB DDR2-667, 100GB HD, ATI Radeon X300, 15" LCD, Seven Ultimate RC |
|
| Back to top |
|
 |
Shark Daddy


Joined: 19 Jun 2002 Posts: 518 Location: Toronto, Canada
|
08 Nov, 2004 5:16 pm |
[sdp=47324] |
|
Try it. I seem to recall going through all that myself... but really there's no reason other than aesthetics to not call it .html that I can see. IE (stupidly) looks at file extensions in addition to MIME types, so I'm pretty sure it'll treat it as a straight XML file. But there's no harm in trying, of course.
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 |
|
| Back to top |
|
 |
|