W3C

Mobile Web Application Best Practices

W3C Recommendation 14 December 2010

This version:
http://www.w3.org/TR/2010/REC-mwabp-20101214/
Latest version:
http://www.w3.org/TR/mwabp/
Previous version:
http://www.w3.org/TR/2010/PR-mwabp-20101021/
Editors:
Adam Connors, Google
Bryan Sullivan, AT&T (until 2008)

Please refer to the errata for this document, which may include some normative corrections.

See also translations.


Abstract

The goal of this document is to aid the development of rich and dynamic mobile Web applications. It collects the most relevant engineering practices, promoting those that enable a better user experience and warning against those that are considered harmful.

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This is the W3C Recommendation of Mobile Web Application Best Practices. This document was developed by the Mobile Web Best Practices Working Group as part of the Mobile Web Initiative.

Since publication as a Proposed Recommendation on 21 October 2010, the Working Group clarified that alternative compression formats (such as EXI) referred to in section 3.4.1 Use Transfer Compression may not share some of the impediments of common compression formats. A diff version is available. No substantive change has been made.

The document contains statements that may be regarded as forward-looking when this document is published (14 December 2010). Examples provided in the How to do it sections sometimes reference on-going works on technologies that the Working Group expects to become prevalent in the development community soon. These sections should be taken with a grain of salt, depending on the actual evolution of these technologies. The best practices statements should remain valid in any case. An implementation report is available.

Comments on this specification may be sent to public-bpwg-comments@w3.org (with public archive).

This document has been reviewed by W3C Members, by software developers, and by other W3C groups and interested parties, and is endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited from another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. This document is informative only. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Table of Contents

1 Introduction
    1.1 Purpose of the Document
    1.2 Audience
    1.3 Scope
        1.3.1 Best Practices
        1.3.2 Web Application
        1.3.3 Mobile Context
        1.3.4 Delivery Context
    1.4 Relationship to other Best Practices and recommendations
    1.5 Terminology
2 Structure of Best Practice Statements
3 Best Practice Statements
    3.1 Application Data
        3.1.1 Use Cookies Sparingly
        3.1.2 Use Appropriate Client-Side Storage Technologies for Local Data
        3.1.3 Replicate Local Data
    3.2 Security and privacy
        3.2.1 Do not Execute Unescaped or Untrusted JSON data
    3.3 User Awareness and Control
        3.3.1 Ensure the User is Informed About Use of Personal and Device Information
        3.3.2 Enable Automatic Sign-in
    3.4 Conservative use of resources
        3.4.1