Jump to content

XHTML worries


Callum

Recommended Posts

Hi,I was reading an article and it said that internet explorer offered no support for xhtml and neither did web hosts. This worried me because I'm using xhtml at the moment.Is this true, because it works fine in IE7? I havn't uploaded the pages to a host yet, but will xhtml be viewable for web visitors using oldish browsers (2002 earliest)Finally, Is this why adobe Dreamweaver Cs3 and Frontpage don't recognise the code I enter? and in the design tab, just display some of the code I entered in the code tab :S ?thanks for your help.

Link to comment
Share on other sites

It doesn't support XHTML. What Internet Explorer is doing is interpretting your XHTML as HTML with a few "/>" in some tags (in other words, wrong HTML).That's why I prefer to use an HTML 4.01 DOCTYPE.

Link to comment
Share on other sites

It's perfectly fine to use XHTML. I actually prefer using it. Never trust WYSIWYG editors (What You See Is What You Get). They add worthless code and never trust their "design tab" or whatever they use to let you see what "browsers" will show. It's ALWAYS ALWAYS wrong....well 99.99% of time.

Link to comment
Share on other sites

XHTML is fine, it's the lack of support by Internet Explorer that isn't.Try this document (You'll have to put it on a server that runs PHP) in Internet Explorer and see if it works:

<?php header("Content-Type: application/xhtml+xml");echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html>  <head>	<title>Document Title</title>	<meta http-equiv="Content-type" content="application/xhtml+xml" />  </head>  <body>	<h1>XHTML Document</h1>	<p>This document is served as <i>application/xhtml+xml</i> rather than <i>text/html</i>. Internet Explorer will attempt to download it rather than render it, because it doesn't recognise it.</p>  </body></html>

Link to comment
Share on other sites

Sorry for sounding arrogant, but due to school work I don't really have time to test the host. I prefer using xhtml over html, but short awnser, am I going to encounter problems if I do all my design in xhtml rather html, when the majority of viewers are using IE 5 or 6?(bearing in mind it works fine in IE when just displaying the file from hard drive)sorry for sounding arrogant,oh and finallly would it take much work to convert my work from xhtml to html?Callum

Link to comment
Share on other sites

I prefer using xhtml over html, but short awnser, am I going to encounter problems if I do all my design in xhtml rather html, when the majority of viewers are using IE 5 or 6?
If you use proper XHTML (that is serving your pages with the xhtml MIME type) then IE will ask clients to download the page, which is bad. If you just, however, use, umm, XML-compliant HTML served as text/html then it is fine. So as long as you don't give your XHTML pages the proper xhtml content-type then you are fine (but not truly using XHTML).
oh and finallly would it take much work to convert my work from xhtml to html?
No, just remove all the slashes off the end of empty tags, change the DTD, and to be really correct also convert tag names to uppercase. But as I said, there's no need to.
Link to comment
Share on other sites

All IE versions can read XHTML pages, as long as they are served as if they are HTML pages.I personally don't think that the MIME type problem alone is a reason not to use XHTML. If you follow the XHTML compatibility guidelines (by the time I found those, I was already following them really), it will all be OK when you migrate to a proper XHTML in the future when it is supported by IE, and at the same it will work in all current browsers.In addition, it's very easy to use PHP to do content negotiation to serve the page as XHTML only to browsers that can handle it, and serve it as HTML to browsers that can't. Thus, it's easy to make a page that is both working and future proof.

Link to comment
Share on other sites

Not sure on this, but will IE8 still have the same issue with the MIME?
Yep. The first beta has this problem, and MS have confirmed (on chats) that the final version of IE8 won't support this MIME type. The reason is they want to make sure they implement it correctly, i.e. enable JavaScript namespace support, ensure a stable XML parser (which actually they already have), implement a good error recovery (I'm thinking they'd do something like Safari - render the page until the first error... but there's no official word on that).Nothing is known for IE9, and MS aren't revealing any concrete plans (i.e. we "may" see XHTML support in IE9).
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...