I got a score of 100% and it says “The page is mobileOK!”; though, there are some warnings in the “Detailed Report section”. I cannot link to the actual page since this is a special project but here is the code I use in the beginning of the HTML codument:
To me it mainly sounds like your server isn’t optimised and since ‘XHTML Basic’ is supposed to be served as “application/xhtml+xml”. Like I have on this ancient beta http://www.xhtmlcoder.com/beck/ (for browsers that accept and the markup validator) but I didn’t design it for mobile conformance.
Your META is basically redundant for encoding for browsers supporting the recommended XHTML “application/xhtml+xml” MIME I suspect that is what some of the warning problems are. It should be done at server level the: <meta http-equiv=“Content-type” content=“application/xhtml+xml;charset=UTF-8” /> is meaningless to an XML Processor, and won’t make your page magically served as XHTML.
It will still remain ‘text/html’ and be parsed by legacy browsers and won’t halt on FATAL errors such as failing well-formedness.
Thanks for your reply. I am testing this on a shared hosting. What do you mean by “your server isn’t optimised”? How do I set set the HTTP headers? By the way, I am not sure if I need the XML declaration or not (<?xml version=“1.0” encoding=“UTF-8”?>), but when I add it, it eliminates one error.
# Enable the mod_expires module
ExpiresActive On
# Set expiration date to 1 month for all style sheets and images
ExpiresByType text/css "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
# Set expiration date to 1 week for all HTML pages
ExpiresByType text/html "access plus 1 week"
ExpiresByType application/xhtml+xml "access plus 1 week"
AddDefaultCharset UTF-8
AddCharset UTF-8 .css
to your .htaccess file will solve your caching information warning and your character encoding problems (assuming you are using UTF-8, of course ).
You might also find RedBot useful for seeing what’s happening.
I was checking that .htaccess solutions but since not all the websites are hosted on Apache, I need to find another solution. This will be a template and I have no control over on which servers people will use it.