Jump to content

PHP MIME Type Vs. Meta MIME Type


Fluoresce

Recommended Posts

Probably a stupid question . . .

 

The MIME type in my php.ini file is set to text/html:

default_mimetype = "text/html"

But, because I use XHTML 1.0 Strict, the MIME type of my web pages is set to text/xml:

<meta http-equiv="content-type" content="text/xml; charset=utf-8" />

I should therefore change the php.ini MIME type to text/xml, right?

 

Link to comment
https://forums.phpfreaks.com/topic/290825-php-mime-type-vs-meta-mime-type/
Share on other sites

The browser ignores the meta element if you've already declared the content type with an HTTP header. In your case, the element only takes effect if the user downloads the document and opens it offline.

 

But using two different content types is of course a bad idea. I generally have no idea why you insist on this exotic XHTML stuff, but that's a different story.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.