Avoid reformatting pages which are marked as already fit for mobile consumption
Pages may be marked as mobile-ready in one or more of the following ways:
- The HTTP response returns the a header "Cache-Control: no-transform"
- The page is on a domain which starts "m.", "wap.", "mobile.", or ends with ".mobi"
- The page is on a domain which contains the word "iphone" or starts "i."
- The page is served with the MIME type "text/vnp.wap.wml", or "application/vnd.wap.xhtml+xml"
- The contents of the page contains one of the following DTDs:
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.1//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile11.dtd">
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">
If a page indicates it has a mobile-ready alternative, use it
If a page contains the META tag below, redirect to the URL supplied in the HREF instead of reformatting the current page:
<link rel="alternate" type="text/html" media="handheld" href="http://example.mobi/" title="Mobile/PDA" />
Allow mobile sites to adapt their own content
The owners of mobile sites may have already taken steps to adapt their content for mobile consumption. It is likely that if they are doing this, they will make use of the User-Agent HTTP header to recognise the handset being used to access their service. In modifying this header, a transcoding proxy prevents the site from using a well-recognised mechanism to adapt its content for the viewing device.
Others
Other suggestions should live here
Removed
I've removed a few suggestions from the list above, but left them here for posterity (and in case there's a good reason to bring em back!):
- do not adapt pictures (suggested by Luca Passani, Russ Beattie pointed out that photo transcoding is a significant reason to use a transcoder, I'd be inclined to agree - any takers?)
- Do not reformat pages that are less than 30kb no matter what (limit can be a bit lower, but only as long as you can positively tell a feature phone from a smartphone) - again, Russ pointed out that RAZR devices, the most popular in the US, have a 5k page-size limit, so require transcoding.
- do not reformat pages with MIME type "application/xhtml+xml", Russ pointed out this is not a mobile-specific MIME type
Mowser now does all of the above (I just tweaked the script a bit to add in the doctype check - good call). I've written it up here:
http://pub.mowser.com/blog/why-mowser-doesnt-suck
couple notes:
"i." isn't anywhere near being a common mobile site identifier, so I'll hold off on that, and "application/xhtml+xml" matches any strict xhtml site, not just mobile, so this isn't a valid marker.
Both of your other suggestions aren't reasonable. Mowser served 16MM images in January - it's 80% of the reason people use the site, and 30kb is 25kb more than a RAZR can handle - which is the most popular phone in the U.S. still.
-Russ
Posted by: Russ | March 22, 2008 at 07:48 PM
Cheers Russ. Most of the suggestions came from a post from Luca Passani on WMLProgramming, I've taken them from there and embellished a couple.
Does no-transform (the (i) you refer to I think) not indicate that content should not be transformed?
Get what you mean about xhtml+xml - I'll remove that, and agree re pictures and RAZR.
Posted by: Tom Hume | March 23, 2008 at 10:53 PM
Tom, Russ,
a few comments to your comments.
I invite you to post any comment you may have about the Reformatting Manifesto on WMLProgramming ( http://tech.groups.yahoo.com/group/wmlprogramming/ ). This is a great place to have all the viewpoints brought to the table openly.
Mowser is better than reformatters installed at carrieres. In my opinion, there are two reasons for that:
- You and Mike have a much better understanding of the mobile internet and way higher ethics than those who want to sell reformatters to operators without caring about the consequences for the ecosystem.
- Mowser is a consumer choice, while Novarra, InfoGin, OpenWeb and ByteMobile are forced on users no matter what, from one day to the next.
Wrt RAZR and the 30kb, this is a great comment. In postings I wrote before the manifesto I stated that 30kb was the limit, but that limit could be lower in case the reformatter was able to positively identify devices with lower capabilities. I sacrificed that complexity for sake of having simple rules, but I am totally open to discussion about this.
With regard to "application/xhtml+xml" it is true that it theoretically matches NON-mobile sites too, but the reality is that nobody uses that MIME type for the web because it breaks ALL versions of Internet Explorer. The MIME type clearly indicates the presence of a mobile websites in 99%+ of cases and this information should be taken into serious consideration by the transcoder (after all, transcoders are all about heuristics, so, this is not going to be a problem).
Thank you
Luca
Posted by: Luca Passani | March 24, 2008 at 10:46 AM
The word 'iphone' anywhere in the URL seems like it could also have potentially unintended consequences but honestly I can't think of them right now.
Posted by: nedrichards | March 25, 2008 at 02:11 PM
Note the Content Transformation Task Force within the W3C is working on such a guidelines document. To "jointly agree" unfortunately takes time, no matter how easy the guidelines may be... So, that's still work in progress, the guidelines document is a draft:
http://www.w3.org/2005/MWI/BPWG/Group/TaskForces/CT/editors-drafts/Guidelines/latest
Some of these ideas are already part of it ("Cache-Control: no-transform", the use of the link element). Using a list of domain prefixes and the like seems more to me like things the transcoding proxy should have in mind, as opposed to rules it must obey. Any comments/new ideas welcome!
(My initial small comment turned into a small post on the topic:
http://www.w3.org/blog/MWITeam/2008/03/25/content_transformation_guidelines )
Posted by: Francois Daoust | March 25, 2008 at 02:57 PM
Francois, the content transformation guidelines tell a transcoder to respect the "no-transform" header, but they tell nothing about the fact that the User-Agent should not be changed, which is really the number one problem with those transcoders.
I authorize W3C to use information find in their manifesto for its Content Transformation group in order to make your work relevant for the developer community.
Luca
Posted by: Luca Passani | March 25, 2008 at 07:10 PM