Since I talked about setting the MIME type with PHP, I figured I might as well give an example of how to do it with Classic ASP as well.

Serving XML:

Response.ContentType = "text/html"
Response.Charset = "utf-8"

Serving XHTML:

If InStr(Request.ServerVariables("HTTP_ACCEPT"), "application/xhtml+xml") > 0 Then
Response.ContentType = "application/xhtml+xml"
Else
Response.ContentType = "text/html"
End If
Response.Charset = "utf-8"

More information on serving XHTML

Leave a Reply