The headers contain meta
information about the body, while the body is the actual document (the HTML or
XHTML markup, in this case).
One very important HTTP header is called Content-Type. This header specifies the
MIME type, and though it can also contain information about the character encoding
that??™s used in the file, this data shouldn??™t be included for XML documents. The
MIME type tells the user agent what type of content it??™s about to receive.
A Content-Type header for an HTML document can look like this:
Content-Type: text/html; charset=utf-8
For an XHTML document, it should look like this:
Content-Type: application/xhtml+xml
It??™s primarily the MIME type that dictates how a web document??™s handled by a
browser. For an XML MIME type, the tag??™s xmlns attribute is what specifies
a document as containing XHTML. The doctype declaration (p. 17) has nothing to
do with this matter, except when it comes to validating the markup.
Internet Explorer doesn??™t support the MIME type application/xhtml+xml.
Pages:
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597