Sign In | Register Now About Bytes | Help | Site Map
Connecting Tech Pros Worldwide

mime types in Apache and the validator

Question posted by: Hendrik Maryns (Guest) on June 27th, 2008 07:16 PM
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
Andreas Prilop's Avatar
Andreas Prilop
Guest
n/a Posts
June 27th, 2008
07:16 PM
#2

Re: mime types in Apache and the validator
On Fri, 6 Jun 2008, Hendrik Maryns wrote:
Quote:
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>
Quote:
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/sea...:Alan.J.Flavell

Beauregard T. Shagnasty's Avatar
Beauregard T. Shagnasty
Guest
n/a Posts
June 27th, 2008
07:16 PM
#3

Re: mime types in Apache and the validator
Hendrik Maryns wrote:
Quote:
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
Quote:
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

Hendrik Maryns's Avatar
Hendrik Maryns
Guest
n/a Posts
June 27th, 2008
07:16 PM
#4

Re: mime types in Apache and the validator
Beauregard T. Shagnasty schreef:
Quote:
Hendrik Maryns wrote:
>
Quote:
>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
>
Quote:
>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

 
Not the answer you were looking for? Post your question . . .
189,798 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors