I am trying to make my AdSense code load closer to the beginning of my mobile website code. My major bottleneck is the doctype declaration.
What I have (as shown) is the doctype mobile profile 1.2 with the following lines at the very beginning of HTML:
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
I'd like to shorten all that to:
But the problem is some older mobile devices might not be able to render the pages correctly. I'm trying to make my site compatible with the world.
When I use the mobile profile and when I format my HTML to make it XHTML, I score a 96% when I test my site with the W3C mobile checker at https://validator.w3.org/mobile/. However, If I do an HTML5 doctype declaration for the mobile site, W3C validator gives me between an 80 something and 94%.
I want to know if I can somehow shorten my declaration without any mobile tool complaining about document type.
I was thinking of maybe hacking the doctype so that it looks more like this:
<!DOCTYPE "XHTML Mobile 1.2" "w3.org/xhtmlmobile12.dtd"><html xmlns="w3.org/xmlns" x:lang="en">
but then again I think that's illegal.
Is there any way I can shorten this doctype so it's still XHTML-like and that it still works with as many mobile devices as possible and that it still passes doctype declatations at https://validator.w3.org/mobile/?