Forum Moderators: open

Message Too Old, No Replies

IE6 and XHTML 1.0 Strict header

Website showing in all other browsers but IE

         

dx112j

7:00 am on Nov 20, 2004 (gmt 0)

10+ Year Member



The problem is my website is being coded in Strict Xhtml 1.0 - it showed when i was using a transitional doctype, but not anymore. All the code validates, but IE is coming up with a blank page.

I have did a search and found many threads/websites on this issue, but as i do know the problem and have come across some solutions i have not been able to fix it on my site.

Some sidenotes: My site is going to be a bilingual Japanese / English site, so i am using different header files (and the glory of php) to make it work. I am posting the code to the underconstruction portion of the site.

Thank you all for any help in advance.

English


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>The Realm</title>
<meta http-equiv="content-language" content="en" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Japanese


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="ja" xml:lang="ja" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>The Realm</title>
<meta http-equiv="content-language" content="ja" />
<meta http-equiv="content-type" content="text/html; charset=shift_jis" />

I also tried using this php sniplet for IE to no avail.


<?
if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")){ header("Content-Type: application/xhtml+xml; charset=UTF-8"); echo('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'); } else { header("Content-Type: text/html; charset=UTF-8"); echo ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'); }

?>

encyclo

12:26 pm on Nov 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld [webmasterworld.com], dx112j.

Just a minor clarification: is the page is not displaying when you are trying to switch the mime type between

application/xhtml+xml
and
text/html
, or does it not display even if you send
text/html
to all browsers (but still using the XHTML 1.0 Strict or XHTML 1.1 doctype)? Also, it's not something like a simple caching issue? (Just clear your temporary internet files in IE).

dx112j

1:10 pm on Nov 20, 2004 (gmt 0)

10+ Year Member



I believe I have tried serving it as both (im kinda new to this sorry). But i am not sure wheter or not i am missing a line of code in the header or some tweak to get it to work in IE.

I should have elaborated further about the problem, By not displaying i meant, the background shows up, the source code is intact and viewable, but no content comes on screen. However when viewed in Firefox or Netscape everything shows up fine. My code also validates 100%.

I should avoid posting 5 in the morning after coding half the night..lolol

dx112j

1:53 pm on Nov 20, 2004 (gmt 0)

10+ Year Member



Heres the url to the underconstruction part of the site if its helpful.

<Sorry, no personal URLs. See TOS [webmasterworld.com]>

Thanks in advance.

[edited by: tedster at 6:18 pm (utc) on Nov. 20, 2004]

encyclo

3:18 pm on Nov 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You might want to check out the terms of service [webmasterworld.com] for the forum which forbids the posting of personal URLs.

If your page displays, even partially, in Internet Explorer, then it is not your mime-type switching code which is affecting things. If you remove the links to the stylesheets, does the page contain all the content (even if unstyled)? If so, then you have a CSS issue, either text formatting or positioning.

dx112j

5:36 am on Nov 21, 2004 (gmt 0)

10+ Year Member



I apologize about that, didnt look over the TOS before posting it.

Thanks for the help. I turned out it was my stylesheet php include file.


I had:
<script src="/_globals/javascript/realm.js" type="text/javascript" />

Instead of:
<script src="/_globals/javascript/realm.js" type="text/javascript"></script>

Which indeed was causing the page to render without any content, but still showing the css background. Looks like IE doesnt like self closing xhtml there.