I have a website that has the following Doctype:
<!DOCTYPE HTML> <html>...</htm>
I found a problem that caused some mobile browsers to break (blackberries and old androids). For example, in Android, when the request is executed, it sends this header:
Accept: application/xml,appliation/xhtml+xml,text/html ...
The problem is that my site is not XHTML compliant, but IIS decides that since the browser requesting the page prefers xhtml, then it should serve this instead of text/html .
I tried to override it by adding <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=UTF-8"> to the page, but it does not work.
I am trying to figure out the easiest way to tell iis to stop xhtml service for all http://mydomain.com/mobile requests. I thought about this by overwriting Response.Content-Type in an HttpModule.
Is there something I'm missing here? What is the best way to fix this?
Micah source share