Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.