OpenSiteMobile
Open source software for the mobile web!
Google Custom Search Code Test
This is a simple page to test/evaluate how Google Custom Search works with typical MobileSiteOS™ pages.
This page is served up as doctype 'HTML5', (mime type 'text/html', utf-8 encoding).
Mobile Website Development Search
Loading Google Custom Search...
As of this writing (8/6/2010), Google Custom Search doesn't work for any DOCTYPE served
as XML. That is, most (all?) Google code can't be served as 'application/xhtml+xml'. Please see our
test page
Google AdSense Script for a complete explanation.
This is of coarse very frustrating. Google code rarely seems to work properly for any doctype
declaration other than HTML Transitional, if that. Placing the Google generated Google Custom Search
code in the body of a page generates errors for the <link rel="stylesheet"> tag. You can't
place link tags in the body of XHTML Strict documents. Placing it in the head secton of the document
then solves the error problem, but the Google Custom Search div doesn't position correctly. What a mess...
The real irony is that using strict xHTML standards could have been the best way to produce pages which
render correctly for mobile devices.