home | web-mapping | data | scripts | bestiary | about | archive

Archive for the 'Classic ASP' Category

setting MIME type with Classic ASP

Sunday, January 21st, 2007

since we talked about setting the MIME type with PHP, we figured we 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

schiller labs is powered by wordpress . dev site and tool shed for emptystreets.net . valid xhtml . valid css