Mobile app version of vmapp.org
Login or Join
Goswami781

: IIS MIME type for XML content recently a third party plugin I'm using to display online magazines stopped working on mobile devices. According to their help page, this happens for people serving

@Goswami781

Posted in: #Iis #Xml

recently a third party plugin I'm using to display online magazines stopped working on mobile devices. According to their help page, this happens for people serving with IIS. Their solution is to set the MIME type .xml to "application/xml". It's by default set to "text/xml". Changing it does work, but would that have unintended side effects or is it actually the correct way and IIS just set it wrong?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Goswami781

1 Comments

Sorted by latest first Latest Oldest Best

 

@Tiffany637

Both text/xml and application/xml are standardized in RFC 3023 for describing a XML document entity. In general, the main difference is that text/* MIME type family is used for human-readable text data (when no explicit support is provided, should be treated as text/plain), while application/* is for machine-readable data not readable by casual users. This has implications for encoding choice algorithm, even in XML.

From the theoretical point of view, if you add the charset parameter (e. g. text/xml;charset=utf-8), there is almost no difference. In practice nobody could guarantee sane implementation of standards. This is why text/xml does not work for you. If you switch to application/xml, you fix your problem and possibly break something else.

Personally I think that application/xml is the safer one as it implies human-unreadable contents. Even better, encode your document using UTF-8 and add the charset parameter (application/xml;charset=utf-8) as UTF-8 must be supported by all XML processors and charset parameter is both strongly recommended by RFC and used in practice to choose encoding.

See also related question on StackOverflow.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme