Provide an obvious link to the mobile version from the desktop version.
在传统网站上提供手机版网站的链接。鹏讯 pensee.net.cn 服务器端做了个检测,如果是 window mobile,ucweb,netfront,psp设备等就自动跳转到 m.pensee.net.cn,有点霸道了,但也可以挽救国内用户可怜的手机流量…
Use a conventional mobile URL, and advertise it.
使用 m.pensee.net.cn 或者 mobile.pensee.net.cn 或者 pensee.net.cn/mobile 等约定俗成的地址。鹏讯开发用的是 pensee.net.cn/mobile,然后 CNAME 到 m.pensee.net.cn
Make the user interface work for mobile devices.
用户界面在手机上要显示得合理,比如下面的 gmail

Format your website for a range of mobile browsers.
多支持一些手机浏览器。比如鹏讯就测试了 ucweb,ie mobile,opera 和 netfront。
Reduce the number of requests and the amount of data transferred
减少 request 和数据量。图片可以使用 data URI scheme,比如这个鹏讯标志 ,看源代码你会发现它不是一个外部图片文件!
Minify your code.
简化代码
Eliminate redirects.
不要使用转向
Use an application cache for local content storage.
比如使用 html5 的 application cache 功能。可惜你我都在中国,在这个神奇的国家 ucweb 这种古老的 opera 6.x 抄袭者大获成功,占据了国内手机浏览器的绝对份额。这家伙可连 html 都还不支持呢(你还以为自己看到的是 html 网页吗?)…
Use CSS3 instead of images where possible.
使用 css3 中的 rounded corners 圆角矩形, gradients渐变, shadows阴影, text transformations文字转换(大多与中文字无关), canvas等技术
Flash is currently not supported even by iPhone or Android browsers. Don’t use it for mobile websites.
苹果拒绝支持 flash(flash 在 *nix 的性能是在太差了)。google 的 Android browsers 目前也不行。
Many BlackBerrys do not have CSS and JavaScript enabled by default. Most users will not dig through menus to enable them.
黑莓浏览器默认 js css 是关掉的!
JavaScript on devices with slow processors can be expensive to execute. Besides implementing network-based optimizations, it’s important to make sure your client-side code is lean, mean, and uses minimal memory too.
不要欺负可怜的手机了,少卖弄点 javascript吧
Test, test test
测试测试再测试
更多资源在 W3C Mobile Web Best Practices,手机浏览器目前还是一片混乱,但 W3C 的标准已经定了,注意以前的 WAP 已经完蛋了,现在是 xhtml 1.1,有兴趣的可以看看 鹏讯手机版开发笔记
英文原文来自 Make the mobile web faster




