by-expession

Expression Web Resources

Is serving XHTML as text/html harmful?

Latest post 04-01-2007 4:54 AM by Jonathon VS. 2 replies.
  • 03-13-2007 1:07 AM

    • bookpage
    • Top 50 Contributor
    • Joined on 12-24-2006
    • Hewitt, TX
    • Posts 5

    Is serving XHTML as text/html harmful?

    <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

    Also found this (somewhere).

    "There are three MIME types that we can use for XHTML documents, which
    will make compliant user agents recognise the document as XML:
    application/xhtml+xml (recommended) application/xml text/xml (not recommended)

    In 2002 Ian Hickson published an article labelled Sending XHTML as
    text/html Considered Harmful. It has been criticised by many XHTML
    proponents, but it should be required reading for anyone who is going
    to use XHTML markup.

    Serving XHTML documents as text/html is not necessarily harmful, if
    you know what you are doing and are aware of the fundamental
    differences between XHTML and HTML. Relying on HTML-only techniques,
    however, is 'harmful', because that means that a purported XHTML
    document will not work as XHTML.

    Thus, if you are going to serve XHTML documents as text/html, you must
    make sure that they also work as intended when served as application/
    xhtml+xml."

     Would welcome any comments on this.

     TIA
     

    Waco Web Designs http://wacowebdesigns.com TAYLOR's BOOK PAGE http://taylorsbookpage.com Member of (IOBA) http://www.ioba.org Independent Online Booksellers Association ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Filed under:
  • 03-29-2007 6:20 PM In reply to

    • cdwise
    • Top 10 Contributor
    • Joined on 12-22-2006
    • Houston, TX
    • Posts 499

    Re: Is serving XHTML as text/html harmful?

    Depends on who you talk to. I wouldn't call it harmful and since IE 5.x doesn't support xhtml/xml application types using it could be considerd to be harmful. To me this is more of a phlisophical debate and since there are real world issues with using the application xml mime type I don't. There are some I know who will not use XHTM and stick with HTML 4.01 because of the real world issues so as not so comprose their purist beliefs. While I advocate standards and accessiblity I will not insist on absolute puity in the face of real world issues.

    To me that position is as bad as hacking like made in attempt to hae pixel perfect rendering in all browser. That way insanity lies.

    Cheryl D Wise MS MVP Expression Instructor: starttoweb.com

  • 04-01-2007 4:54 AM In reply to

    Re: Is serving XHTML as text/html harmful?

    I don't think it's necessarily harmful to render XHTML 1.0 as text/html, because text/html is an officially supported MIME type in the specification. XHTML 1.1 and 2.0, however, should not use text/html, but rather text/xml, application/xml, or application/xhtml+xml, only the first of which can be implemented with any degree of success in most browsers. (I can't count the number of times I've seen XHTML 1.1 rendered as text/html, and because the validator doesn't complain the designers don't think they're doing anything wrong.)

    That said, I don't think it's necessarily a bad thing that people insist on HTML doctypes when using text/html. The W3C still advocates use of HTML 4.01 along with XHTML 1.0 and 1.1, and chances are browsers will support HTML for the next ten years at least. XHTML 2.0 isn't going to be an official W3C Recommendation until September 2008, and IE won't support it until probably 2010 or 2011 (or, if they take as long as they did with PNG support, 2019!). Even the most current browsers lag a bit behind, though; XForms are an official W3C Recommendation now and AFAIK only Firefox 3 can handle them.
    Jonathon VS Freelance Web Artist www.jonathonvs.com
    Filed under: ,
Page 1 of 1 (3 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems Sponsored by: Start to Web
@ 2005-2008 Cheryl D Wise