This isn't specifically about mobile programming but more about detecting mobile content so I would guess mobile gurus can advise on this....
Basically my VB.Net app is pulling down pages from servers using a webrequest. I parse these files to determine their content type etc.
I want to detect mobile content which is easy for the likes of :
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN"
"http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"
"http://www.wapforum.org/DTD/wml12.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD Compact HTML 1.0 Draft//EN">
However looking at a few of the mobile frameworks (jquery to name one) they don't require any kind of signature. Having checked the content-type of a number of sites this also doesn't give anything away.
I could parse the script tags and assume that if there is a framework attached it is in use, but this seems like a pretty ropey assumption and requires me to know about all frameworks.
How would you propose that I detect if a page is a mobile one?
Should developers really be adding a DOCTYPE as good practice?