Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have been testing my project using the W3C Validation tool and it passes 100% with no errors and just 1 warning - XHTML 1.0 Transitional.

Warning - Conflict between Mime Type and Document Type

After some research I can find tons of definitions of the various MIME types, so the correct one for my project is 'application/xhtml+xml'.

But, where does it go - is it part of the DTD?

What other code do I need as this doesn't look complete on it's own?

share|improve this question
2  
Are you sure you actually want to do this? Unless you know exactly what you're doing–in which case you'd probably already know how to take care of it–you're potentially opening yourself up to a lot of problems, only starting with browser compatibility. Then Javascript. Then well-formedness as an absolute requirement. And so on. Otherwise, as @DKOATED says. –  Su' Apr 25 '13 at 10:08
    
It was the idea of having a W3C valid website, but you could be right as it's new territory for me and probably not worth the potential issues. Thanks –  Ubique Apr 25 '13 at 12:28

1 Answer 1

Usually you set mime-types for different types of "files" which are passed from your server to the receiver.

In Apache you would add the following lines to your .htaccess file (in your root directory):

AddType application/xhtml+xml .xhtml .xht

You'd add the file's extension to whatever you'd want to transfer with that mimetype. Be it .xhtml, .xht, .html, .php or whatever.

See Configuring MIME Types in .htaccess and Mod MIME under AddType Directive

share|improve this answer
    
Thanks for the explanation, I'm not comfortable with the server side and was thinking it was a simple page markup issue. Thanks for answering :-) –  Ubique Apr 25 '13 at 12:29
    
no problem. glad to be of help... –  DKOATED Apr 25 '13 at 15:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.