Click here to get back home

mime types in Apache and the validator

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
mime types in Apache and the validator Hendrik Maryns 06-06-2008
Posted by Hendrik Maryns on June 6, 2008, 7:58 am
Please log in for more thread options
Hi all,

First of all, this is probably a little OT here, please point me to a
better place if you deem that appropriate.

My website (see sig) validates fine, but with one annoying warning:

The document is being served with the text/html Mime Type which is not a
registered media type for the XHTML 1.1 Document Type. The recommended
media type for this document is: application/xhtml+xml

The index file is called index.shtml since it uses some SSI. To tell
this to the server, I include a little .htaccess file in the directory
containing the following line:

DirectoryIndex index.shtml

I tried to fix the warning by adding the following:

# AddType application/xhtml+xml shtml html

But then the SSI no longer works, and Firefox shows the page with a
white border around <body>. Same thing happens if I call it index.xhtml.

Seems like this is a Firefox bug? What is the proper way to handle this?

Cheers, H.
--
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html

Posted by Andreas Prilop on June 6, 2008, 8:50 am
Please log in for more thread options
On Fri, 6 Jun 2008, Hendrik Maryns wrote:

> First of all, this is probably a little OT here,
> please point me to a better place if you deem that appropriate.

<news:comp.infosystems.www.servers.unix>

> The document is being served with the text/html Mime Type which is not a
> registered media type for the XHTML 1.1 Document Type. The recommended media
> type for this document is: application/xhtml+xml

Short answer:

Do not use application/xhtml+xml and XHTML 1.1 on the web if you want
to be read by everyone. You could do this for some testing etc.

For publication on the web, use text/html with HTML 4 Strict or
XHTML 1.0 Strict.

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/search?q=author:Alan.J.Flavell

Posted by Beauregard T. Shagnasty on June 6, 2008, 10:24 am
Please log in for more thread options
Hendrik Maryns wrote:

> The document is being served with the text/html Mime Type which is not
> a registered media type for the XHTML 1.1 Document Type.

See this:
http://tekrider.net/html/doctype.php

> The recommended media type for this document is: application/xhtml+xml

..and Internet Explorer users won't be able to use your page.

--
-bts
-Friends don't let friends drive Windows

Posted by Hendrik Maryns on June 9, 2008, 6:58 am
Please log in for more thread options
Beauregard T. Shagnasty schreef:
> Hendrik Maryns wrote:
>
>> The document is being served with the text/html Mime Type which is not
>> a registered media type for the XHTML 1.1 Document Type.
>
> See this:
> http://tekrider.net/html/doctype.php
>
>> The recommended media type for this document is: application/xhtml+xml
>
> ..and Internet Explorer users won't be able to use your page.

Thanks both. That’s what I suspected. I’ll live with the warning until
the world gets better (i.e. Firefox displays it properly and IE displays
it at all).

Cheers, H.
--
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html

Similar ThreadsPosted
xhtml, custom dtds, and MIME types January 27, 2006, 2:34 pm
MIME type for Windows 16-bit executable January 13, 2007, 12:09 pm
trying to embed video by mime type July 27, 2008, 8:46 am
XHTML Mime Type support in MSIE 7.0 October 2, 2005, 6:42 pm
Searching simple (!) web server which allows WAP/WML MIME pages August 5, 2006, 1:45 pm
types of audio files for web page April 28, 2005, 4:59 pm
how to display whatever the user types in a textarea November 17, 2005, 1:24 pm
W3C discussion of link types and language February 24, 2006, 11:26 am
Problem with xhtml Validator at http://validator.w3.org/ July 27, 2005, 5:06 am
Web service -> IIS and Apache rendering November 15, 2004, 10:59 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap