Serving XML and XHTML with Classic ASP
21 January 2007 | Posted by Jeffrey Barke | No comments
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"


Leave a Reply