Mobile Web App最佳实践

原文:

http://developer.android.com/guide/webapps/best-practices.html

主要几点:

1. Redirect mobile devices to a dedicated mobile version of your web site

重定向Mobile的请求到对应的mobile版本的web服务,可以通过判断user-agent

2. Use a valid markup DOCTYPE that's appropriate for mobile devices

使用合理的DOCTYPE实现webpage,比如xhtml basic就是在移动端常用的DOCTYPE

3. Use viewport meta data to properly resize your web page

通过meta标签的viewport属性来规范手机页面的展现。

4. Avoid multiple file requests

避免网页中直接请求文件,比如js和css文件,可以将js和css直接写在网页的head标签里

5. Use a vertical linear layout

使用简单的layout

你可能感兴趣的:(Web app)