<<

Standards for Web Applications on Mobile: current state and roadmap

October 2014

Latest version http://www.w3.org/Mobile/mobile-web-app-state/ This version http://www.w3.org/2014/10/mobile-web-app-state/ (PDF version) Previous version http://www.w3.org/2014/07/mobile-web-app-state/

Web technologies have become powerful enough that they are used to build full-featured applications; this has been true for many years in the desktop and laptop computer realm, but is increasingly so on mobile devices as well.

This document summarizes the various technologies developed in W3C that increase the capabilities of Web applications, and how they apply more specifically to the mobile context. A good subset of these technologies are described and explained in the W3C on-line training on programming Web applications1.

1. ...... 4 2. Multimedia...... 12 3. Device Adaptation ...... 16 4. Forms ...... 20 5. User interactions ...... 24 6. Data storage ...... 30 7. Personal Information Management...... 34 8. Sensors and hardware integration ...... 36 9. Network...... 40 10. Communication & Discovery ...... 44 11. Packaging...... 47 12. Payment...... 50 13. Performance & Optimization...... 52 14. Privacy & Security...... 56

Status and changes

This document is the 15th edition of this overview of mobile Web applications technologies. The previous edition was released in July 20142. A live version of this document accepts contributions on the W3C Web and Mobile Interest Group Github repository3.

This document is published by the Web and Mobile Interest Group4; feedback on every aspect of this document should be sent to [email protected], the publicly archived mailing list5 of the interest group, or raised as issues on the Github repository6, or alternatively to the author ([email protected]). It will serve as input for the next iteration of the document.

It documents the following changes in the since July 2014:

1. http://www.w3devcampus.com/writing-great-web-applications-for-mobile/ 2. http://www.w3.org/2014/07/mobile-web-app-state/ 3. https://github.com/w3c-webmob/mobile-web-app-standards/ 4. http://www.w3.org/Mobile/IG/ 5. http://lists.w3.org/Archives/Public/public-web-mobile/ 6. https://github.com/w3c-webmob/mobile-web-app-standards/issues/

1/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE DOCUMENT STRUCTURE

Emerging work • the Second Screen Presentation Working Group7 has been chartered to work on an API to request display of content on an external screen, with an editor draft8 available, based on the work previously done in the eponymous Community Group; • a draft API from the Web Bluetooth Community Group9 has been made available; • the Device Working Group has started work on a generic pattern for sensors APIs10 which aims at unifying and simplifying the creation and usage of APIs for sensors; • work on an API to manage permissions across other APIs11 has started, to be potentially added to the Web App Security Working Group12; Published as First Public Working Draft • Resource Hints13, a set of markup-based hints for increased network performance, was published as a First PUblic Working Draft by the Web Performance Working Group; Returned to Last Call • the Battery Status API14 returned to Last Call after normative changes made based on implementation feedback; • likewise, Pointer Events15 returned to Last Call Working Draft following implementors feedback; • a new Last Call Working Draft of CSS Flexible Box Layout Module Level 116 was announced; Reached Candidate Recommendation • the Canvas API specification17 was re-published as a Candidate Recommendation after its latest round of Last Call review; • likewise, the vibration API18 and HTML Media Capture19 specifications were re-published as a Candidate Recommendation; • CSS Backgrounds and Borders Module Level 320 was published as a Candidate Recommendation Reached Recommendation • after 10 years of effort, HTML521, the cornerstone of the Open Web Platform, was published as a W3C Recommendation Specification merged, split or abandoned • The Resource Priorities22 specification from the Web Performance Working Group was abandoned in favor of the Resource Hints23 one; Newly tracked • This document now separately tracks the touch-action property defined in Pointer Events24, as this property is gaining more traction than the overall API;

Document structure

The features that these technologies add to the Web platform are organized under the following categories: graphics, multimedia, device adaptation, forms, user interactions, data storage, personal information management, sensors and hardware integration, network, communication and discovery, packaging, payment, performance & optimization and privacy & security.

7. http://www.w3.org/2014/secondscreen/ 8. http://w3c.github.io/presentation-api/ 9. https://webbluetoothcg.github.io/web-bluetooth/ 10. https://github.com/w3c/sensors 11. https://w3c.github.io/permissions/ 12. http://www.w3.org/2011/webappsec/ 13. http://www.w3.org/TR/resource-hints/ 14. http://www.w3.org/TR/battery-status/ 15. http://www.w3.org/TR/pointerevents/ 16. http://www.w3.org/TR/css-flexbox-1/ 17. http://www.w3.org/TR/2dcontext/ 18. http://www.w3.org/TR/vibration/ 19. http://dev.w3.org/2009/dap/camera/ 20. http://www.w3.org/TR/css3-background/ 21. http://www.w3.org/TR/html5/ 22. http://www.w3.org/TR/resource-priorities/ 23. http://www.w3.org/TR/resource-hints/ 24. https://dvcs.w3.org/hg/pointerevents/raw-file/tip/pointerEvents.#the-touch-action--property

2/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE DOCUMENT STRUCTURE Other users

Packaging Web Application Web Application Web Application Other apps Content Web Comm. Text Network Graphics Other devices PIM Multimedia Storage User Input User Interactions Hardware User Forms &Sensors

The Web as an application development platform

In each category, a table summarizes for each feature:

• which W3C specification defines the feature, • which W3C group is responsible of the said specification, • the stage of the specification in the W3C Recommendation track (see below), • the estimated stability of the feature, i.e. how little the author expects it to change, from an early draft that can still evolve a lot, to a finished document with only minor expected changes, • a link to the latest editors draft of the document, and a representation of the recent editing activity; • some qualitative indication on availability of implementations on mobile devices, based on data collected primarily from Can I Use…25 and mobile HTML526, completed with data from developer network27, QuirksMode28, JWPalyer's state of HTML5 video29, Chromium Dashboard30, Platform status31, the Device APIs Working Group Implementation status32 as well as the author’s understanding of the mobile devices market (see also the code used to generate the support icons33) • When available, a link to a relevant tutorial on WebPlatform Docs34, and to relevant on-line training courses on W3DevCampus35 • a link to the test suite for the said feature, and when relevant, a github ribbon to access the underlying git repository.

As a reminder, W3C creates by progressing documents through its Recommendation track36, with the following stages:

“Editors drafts” represent the current view of the editors of the specification but have no standing in terms of Editors standardization.

“Working Drafts” (WD) are early milestones of the Working Group progress. WD

25. http://caniuse.com/ 26. http://mobilehtml5.org/ 27. https://developer.mozilla.org/ 28. http://quirksmode.org/ 29. http://www.jwplayer.com/html5/mediasource/ 30. http://www.chromestatus.com/ 31. http://status.modern.ie/ 32. http://www.w3.org/2009/dap/wiki/ImplementationStatus 33. https://github.com/dontcallmedom/canmymobilebrowser 34. http://docs.webplatform.org/wiki/Main_Page 35. http://www.w3devcampus.com/ 36. http://www.w3.org/2005/10/Process-20051014/tr.html#Reports

3/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 1. GRAPHICS

“Last Call Working Drafts” signal that the Working Group has determined that the specification fulfills its LCWD requirements and all the known issues have been resolved, and thus requests feedback from the larger community.

“Candidate Recommendations” (CR) trigger a call for implementations where implementors are invited to CR implement the specification and send feedback; Working Groups are expected to show the specification gets implemented by running test suites they have developed.

“Proposed Recommendations” (PR) manifests that the group has gathered sufficient implementation experience, PR and triggers the final review by W3C Members

“W3C Recommendations” (Rec) are stable and completed Web standards; these documents only get updated rarely, Rec through the “Edited Recommendation” process, as a results from errata collected by Working Groups.

Prior to starting standardization, a Working Group needs to be chartered, based on input from W3C Members, often through the organization of a workshop37, or after the reception of a W3C Member Submission38.

W3C has set up Community Groups39, a mechanism that allows anyone to do experimental work within the W3C infrastructure, under IPR rules that are compatible to transition the work to the W3C standardization process.

1. Graphics

SVG40, Scalable , provides an XML-based markup language to describe two-dimensions vector graphics. Since these graphics are described as a set of geometric shapes, they can be zoomed at the user request, which makes them well-suited to create graphics on mobile devices where screen space is limited. They can also be easily animated, enabling the creation of very advanced and slick user interfaces.

The integration of SVG in HTML5 opens up new possibilities, for instance applying advanced graphic filters (through SVG filters) to multimedia content, including videos. SVG 2.041 is set to facilitate that integration and complete the set of features in SVG.

In complement to the declarative approach provided by SVG, the element added in HTML5 enables a 2D programmatic API42 that is well-suited for processing graphics in a less memory intensive way. That API not only allows rendering graphics, but can also be used to do image processing and analysis — HTML 5.143 adds the ability to do that processing in a separate Web Worker44.

Both SVG and HTML can be styled using CSS45 (Cascading Style Sheets); in particular, CSS3 (the third level of the specification) is built as a collection of specifications set to offer a large number of new features that make it simple to create graphical effects, such as rounded corners46, complex background images, shadow effects (CSS Backgrounds and Borders47), rotated content48 (CSS Transforms49, including with 3D effects).

Animations can be described declaratively via CSS Animations50, and CSS Transitions51.

37. http://www.w3.org/2003/08/Workshops/ 38. http://www.w3.org/Submission/ 39. http://www.w3.org/community/ 40. http://www.w3.org/TR/SVG11/ 41. https://svgwg.org/svg2-draft/ 42. http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/ 43. http://www.w3.org/TR/html51/ 44. http://www.w3.org/html/wg/drafts/html/master/scripting-1.html#proxying-canvases-to-workers 45. http://www.w3.org/standards/techs/css 46. http://dev.w3.org/csswg/css-backgrounds/ 47. http://www.w3.org/TR/css3-background/ 48. http://dev.w3.org/csswg/css-transforms/Overview.html 49. http://www.w3.org/TR/css3-transforms/ 50. http://dev.w3.org/csswg/css3-animations/

4/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 1. GRAPHICS

Animations can also be managed via scripting through the API exposed in Web Animations52; as they can be resource intensive, the possibility offered by the Timing control for script-based animations API53 to manage the rate of updates to animations can help keep them under control.

To ensure optimal performances when animating parts of an app, authors can make use of the CSS will-change54 property to let browsers compute the ahead of its occurrence.

CSS Flexbox55 allows to build complex layouts as required for interactive applications on small screens.

Fonts play also an important role in building appealing graphical interfaces, but mobile devices are in general distributed with only a limited set of fonts. WOFF 1.056 () addresses that limitation by making it easy to use fonts that are automatically downloaded through style sheets, while keeping the size of the downloaded fonts limited to what is actually needed to render the interface. The upcoming WOFF 2.057 update to that format promises 25%-smaller download sizes; on mobile, a 35% reduction in the time needed to download and display these fonts has been measured.

Given the time required for downloading fonts over mobile networks, authors need to adapt their content to the progressive availability of fonts; CSS Font Loading58 gives the necessary events to developers to enable that adaptation.

Another important aspect in graphics-intensive applications (e.g. games) is the possibility to use the entire screen to display the said graphics; the Fullscreen API59 lets a Web application requests and detects full screen display.

Likewise, in these scenarios, it is often useful to be able to lock the orientation of the screen; the Screen Orientation API60 allows not only to detect orientation change, but also to lock the orientation in a specific state.

NB: a 3D graphic API for HTML5 canvas, called WebGL61, has been developed outside of W3C, as part of the Khronos Group62; this API has been built to be compatible with OpenGL ES63, i.e. for embedded systems, and is intended to work on mobile devices.

51. http://dev.w3.org/csswg/css-transitions/ 52. http://w3c.github.io/web-animations/ 53. http://w3c.github.io/animation-timing/ 54. http://dev.w3.org/csswg/css-will-change/ 55. http://dev.w3.org/csswg/css-flexbox/ 56. http://www.w3.org/TR/WOFF/ 57. http://dev.w3.org/webfonts/WOFF2/spec/ 58. http://dev.w3.org/csswg/css-font-loading/ 59. https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html 60. https://dvcs.w3.org/hg/screen-orientation/raw-file/tip/Overview.html 61. http://www.khronos.org/webgl/ 62. http://www.khronos.org/ 63. http://www.khronos.org/opengles/

5/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 1. GRAPHICS

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

High coverage66

Widely deployed Scalable Vector New version of 3.2+ 37+ 10+ 38+ Graphics (SVG) 1.1 Rec Finished SVG (SVG 2.0) in

Specification preparation 10+ 10+ 32+

65 2D Vector SVG64 Graphics Last updated N/A November 2014 N/A

Scalable Vector WD X X X X Early draft Graphics (SVG) 267 X X X D J F M A M J J A S O N 2013 2014 Commits on ed. draft

Good coverage72

Last updated June Widely deployed 2014 2D Programmatic HTML Canvas 2D 3.2+ 3+ 10+ 38+ HTML69 CR Stable API Context68 D J F M A M J J A S O N 10+ 10+ 32+ 2013 2014 70 Commits on ed. draft

71

64. http://www.w3.org/Graphics/SVG/WG/ 65. http://docs.webplatform.org/wiki/svg/tutorials 66. http://www.w3.org/Graphics/SVG/Test/ 67. http://www.w3.org/TR/SVG2/ 68. http://www.w3.org/TR/2dcontext/ 69. http://www.w3.org/html/wg/ 70. http://docs.webplatform.org/wiki/tutorials/canvas/canvas_tutorial 71. http://www.w3devcampus.com/html5-w3c-training/ 72. http://w3c-test.org/2dcontext/

6/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 1. GRAPHICS

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated None October 2014

None Canvas Proxy for WD ? ? ? ? Web Workers in Early draft HTML 5.173 ? ? ?

D J F M A M J J A S O N 2013 2014 Commits on ed. draft

Good coverage76 Last updated Well deployed August 2014 CSS Backgrounds 6.0+ 37+ 24+ 38+ Rounded Corners and Borders CR Mostly finished D J F M A M J J A S O N Module Level 3 10+ 11+ 32+ 2013 2014 Commits on ed. draft 75

Good coverage Last updated Well deployed August 2014 Complex CSS Backgrounds 74 CSS 6.0+ 37+ 24+ 38+ background and Borders CR Mostly finished D J F M A M J J A S O N images Module Level 3 10+ 11+ 32+ 2013 2014 Commits on ed. draft

Good coverage Last updated Well deployed August 2014 CSS Backgrounds 6.0+ 37+ 24+ 38+ Box shadow effects and Borders CR Mostly finished D J F M A M J J A S O N Module Level 3 10+ 11+ 32+ 2013 2014 Commits on ed. draft

73. http://www.w3.org/TR/html51/scripting-1.html#proxying-canvases-to-workers 74. http://www.w3.org/Style/CSS/members 75. http://docs.webplatform.org/wiki/tutorials/CSS_background_images 76. http://test.csswg.org/harness/suite/CSS3-BACKGROUND_DEV/

7/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 1. GRAPHICS

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Good coverage79 Last updated Well deployed October 2014 CSS Transforms 3.2+ 2.1+ 11+ 38+ 2D Effects WD Mostly stable Module Level 177 D J F M A M J J A S O N 10+ 10+ 32+ 2013 2014 Commits on ed. draft SVG and 78 CSS Good coverage Last updated Well deployed October 2014 CSS Transforms 3.2+ 3+ 24+ 38+ 3D Effects WD Stabilizing Module Level 1 D J F M A M J J A S O N 10+ 10+ 32+ 2013 2014 Commits on ed. draft

well started Last updated Well deployed October 2014 3.2+ 37+ 12.1+ 38+ CSS Animations80 WD Early draft D J F M A M J J A S O N 10+ 10+ 32+ 2013 2014 Commits on ed. draft 81 Animations CSS well started Last updated Well deployed August 2014 3.2+ 2.1+ 10+ 38+ CSS Transitions82 WD Early draft D J F M A M J J A S O N 10+ 10+ 32+ 2013 2014 Commits on ed. draft 83

77. http://www.w3.org/TR/css-transforms-1/ 78. http://docs.webplatform.org/wiki/tutorials/css_transforms 79. http://test.csswg.org/harness/suite/CSS3-TRANSFORMS_DEV/ 80. http://www.w3.org/TR/css3-animations 81. http://docs.webplatform.org/wiki/tutorials/css_animations 82. http://www.w3.org/TR/css3-transitions/ 83. http://docs.webplatform.org/wiki/tutorials/css_transitions

8/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 1. GRAPHICS

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated None November 2014 Limited

Web Animations SVG and WD X 37+ 24+ 38+ Early draft 1.084 CSS D J F M A M J J A S O N X X X 2013 2014 Commits on ed. draft

Last updated Well started87 Well deployed September 2014 Timing control for 6.0+ 37+ 24+ 38+ script-based Web Performance86 CR Stable 85 D J F M A M J J A S O N animations 10+ 10+ 32+ 2013 2014 Commits on ed. draft

Last updated A few experimental N/A August 2014 ones

CSS Will Change WD Early draft X 37+ 24+ 38+ Module Level 188 D J F M A M J J A S O N 2013 2014 X X X Commits on ed. draft

CSS Last updated Good coverage90 November 2014 Well deployed CSS Flexible Box LCWD 7.0+ 37+ 12.1+ 38+ Complex layouts Layout Module Mostly finished 89 Level 1 D J F M A M J J A S O N 10+ 11+ 32+ 2013 2014 Commits on ed. draft

84. http://www.w3.org/TR/web-animations/ 85. http://www.w3.org/TR/animation-timing/ 86. http://www.w3.org/2010/webperf/ 87. https://github.com/w3c/web-platform-tests/tree/master/animation-timing 88. http://www.w3.org/TR/css-will-change-1/ 89. http://www.w3.org/TR/css-flexbox-1/ 90. http://test.csswg.org/suites/css3-flexbox/nightly-unstable/

9/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 1. GRAPHICS

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Good coverage93

Good deployment

WOFF File Format 5.0+ 37+ 11+ 38+ Rec Finished Finished 1.0 10+ 10+ 32+

WebFonts91 92

Last updated N/A Very limited Downloadable October 2014

fonts WOFF File Format WD X 37+ 24+ 38+ Early draft 2.094 D J F M A M J J A S O N 2013 2014 X X X Commits on ed. draft

Last updated N/A November 2014 Limited

CSS Font Loading LCWD X X X 35+ CSS Stabilizing Module Level 395 D J F M A M J J A S O N X X X 2013 2014 Commits on ed. draft

None Last updated Growing October 2012 deployment

96 CSS and WD Fullscreen display Fullscreen Early draft X X 24+ 38+ Web Applications97 D J F M A M J J A S O N 2013 2014 10+ 11+ 32+ Commits on ed. draft 98

91. http://www.w3.org/Fonts/WG/ 92. http://docs.webplatform.org/wiki/tutorials/typography/font-face 93. http://dev.w3.org/webfonts/WOFF/tests/Format/Tests/xhtml1/testcaseindex.xht 94. http://www.w3.org/TR/WOFF2/ 95. http://www.w3.org/TR/css-font-loading-3/ 96. http://www.w3.org/TR/fullscreen/ 97. http://www.w3.org/2008/webapps/ 98. http://docs.webplatform.org/wiki/tutorials/using_the_full-screen_api

10/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 1. GRAPHICS

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated April Growing None 2014 deployment

The Screen WD Orientation Lock Web Applications Early draft X X X 38+ Orientation API99 D J F M A M J J A S O N 2013 2014 X 11+ 32+ Commits on ed. draft

99. http://www.w3.org/TR/screen-orientation/

11/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 2. MULTIMEDIA

2. Multimedia

HTML5 adds two tags that dramatically improve the integration of multimedia content on the Web: the

The playback content can be augmented and completed via Media Source Extensions101 that lets developers generate media content in JavaScript.

To cater for the needs of some content providers, a proposal to enable playback of protected content, Encrypted Media Extensions102 is an API that is under consideration in the HTML Working Group.

The Network Service Discovery API103 opens the door for integrating DLNA-hosted content into Web applications, although the future of that specification is currently under scrutiny, due to the current lack of implementors interest.

While the new HTML5 tags allow to play multimedia content, the HTML Media Capture104 defines a markup-based mechanism to access captured multimedia content using attached camera and microphones, a very common feature on mobile devices. The Web Real-Time Communications Working Group105 and the Device APIs Working Group106 are building together an API (getUserMedia)107 to directly manipulate streams from camera and microphones, as well as an API to record these streams108 into files, and another API to use access to cameras to take photos programatically109.

Beyond capturing and recording, two additional APIs add multimedia manipulation capabilities to the Web platform. We have already mentioned the Canvas 2D Context API: it enables modifying images, which in turn opens up the possibility of video editing.

In a similar vein, the Audio Working Group110 is working on an API that that makes it possible to modify audio content, as well as analyze, modify and synthesize sounds, the Web Audio API111.

The combination of all these features marks the starting point of the Web as a comprehensive platform for multimedia, both for consuming and producing. The rising interest around bridging the Web and TV worlds (manifested through the W3C Web and TV Interest Group112) should strengthen that trend in the coming months. Mobile devices are expected to take a growing role in many users TV experience, providing a “second screen” experience, where users can find more information on or interact with a TV program they're watching via their mobile devices.

100. http://www.w3.org/html/wg/drafts/html/CR/embedded-content-0.html#the-video-element 101. https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html 102. http://w3c.github.io/encrypted-media/ 103. https://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html 104. http://dev.w3.org/2009/dap/camera/ 105. http://www.w3.org/2011/04/webrtc/ 106. http://www.w3.org/2009/dap/ 107. http://w3c.github.io/mediacapture-main/ 108. https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/MediaRecorder.html 109. https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/ImageCapture.html 110. http://www.w3.org/2011/audio/ 111. http://webaudio.github.io/web-audio-api/ 112. http://www.w3.org/2011/webtv/

12/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 2. MULTIMEDIA

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Well started115 Last updated October 2014 Good deployment

video element in 3.2+ 2.3+ 11+ 38+ Video playback Rec Stable HTML5113 10+ 10+ 32+ 114 D J F M A M J J A S O N 2013 2014 Commits on ed. draft

Started118 Last updated October 2014 Good deployment

audio element in 3.2+ 2.3+ 11+ 38+ Audio playback Rec Stable HTML5116 10+ 10+ 32+ HTML 117 D J F M A M J J A S O N 2013 2014 Commits on ed. draft

Well started121 Last updated Well deployed November 2014

Generation of Media Source CR 8+ X ? 23+ Stable media content Extensions119 D J F M A M J J A S O N 11+ 25+ 2013 2014 ? Commits on ed. draft 120

Last updated Growing None November 2014 deployment

Protected content Encrypted Media WD Early draft 8+ X X 32+ playback Extensions122 D J F M A M J J A S O N 2013 2014 X 11+ X Commits on ed. draft

113. http://www.w3.org/TR/html5/embedded-content-0.html#the-video-element

13/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 2. MULTIMEDIA

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated None None February 2014

Multimedia Network Service WD Early draft, unsure X X X X Gallery access Discovery123 future D J F M A M J J A S O N 2013 2014 X X X Commits on ed. draft Device APIs Last updated Growing Good coverage125 October 2014 deployment

HTML Media CR Stable 6.0+ 3.0+ X 18+ Capture124 D J F M A M J J A S O N 2013 2014 10+ X 9+ Commits on ed. draft

Last updated well started127 Limited but October 2014 growing

Capturing audio/ Media Capture and WD Stabilizing X 37+ 12+ 38+ video Streams126 D J F M A M J J A S O N 10+ X 32+ Device APIs and 2013 2014 Commits on ed. draft Web Real-Time Communications Last updated None None August 2014

MediaStream WD X X X X Early draft Recording128 D J F M A M J J A S O N 29+ 2013 2014 X X Commits on ed. draft

114. http://docs.webplatform.org/wiki/tutorials/video_basics 115. http://w3c-test.org/html/semantics/embedded-content/the-video-element/ 116. http://www.w3.org/TR/html5/embedded-content-0.html#the-audio-element 117. http://docs.webplatform.org/wiki/tutorials/audio_tag 118. http://w3c-test.org/html/semantics/embedded-content/the-audio-element 119. http://www.w3.org/TR/media-source/ 120. http://docs.webplatform.org/wiki/tutorials/MSEPrimer 121. http://w3c-test.org/media-source/ 122. http://www.w3.org/TR/encrypted-media/ 123. http://www.w3.org/TR/discovery-api/ 124. http://www.w3.org/TR/html-media-capture/ 125. http://w3c-test.org/html-media-capture/ 126. http://www.w3.org/TR/mediacapture-streams/

14/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 2. MULTIMEDIA

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated None None August 2014

Mediastream Image WD X X X X Early draft Capture129 D J F M A M J J A S O N 2013 2014 X X X Commits on ed. draft

Good coverage

Last updated June Widely deployed 2014 Image & Video HTML Canvas 2D 3.2+ 3+ 10+ 38+ analysis, HTML CR Stable Context D J F M A M J J A S O N modification 10+ 10+ 32+ 2013 2014 Commits on ed. draft

Last updated Started132 November 2014 Growing

Audio analysis, WD 6.0+ X 24+ 38+ Web Audio API130 Audio Starting to stabilize modification X X 32+ D J F M A M J J A S O N 2013 2014 Commits on ed. draft 131

127. http://w3c-test.org/mediacapture-streams/ 128. http://www.w3.org/TR/mediastream-recording/ 129. http://www.w3.org/TR/image-capture/ 130. http://www.w3.org/TR/webaudio/ 131. http://docs.webplatform.org/wiki/tutorials/audio/an_introduction_to_the_web_audio_api 132. http://w3c-test.org/webaudio/

15/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 3. DEVICE ADAPTATION

3. Device Adaptation

Mobile devices not only differ widely from traditional computers, but they also have a lot of variations among themselves, in term of screen size, resolution, type of keyboard, media recording capabilities, etc.

The Device Description Repository API133 is a unified server-side API that allows Web developers to retrieve data on the devices that are accessing their pages on a variety of device information database.

The Media Capture Streams API exposes some specific information on capabilities of camera and microphones to make it possible to take advantage of the large variety of media capturing devices provided on mobile phones.

CSS Media Queries134 offer a mechanism that allows adapting the layout and behavior of a Web page based on some of the characteristics of the device, including the screen resolution — to which Media Queries Level 4135 proposes to add the availability and type of a pointing device, the ability to hover over elements, and the ambient luminosity.

CSS Device Adaptation136 defines a set of CSS directives to define the size on which this layout should be based, relatively to the size of the underlying device — specifying what has been implemented using the element so far.

The viewport-relative CSS units vw and vh137 let design layouts that adapt to the dimensions of the viewport, while CSS Mobile Text Size Adjustment138 lets text adapt to zoomed parts of a page.

The Responsive Images Community Group (RICG)139 is currently working on an extension to HTML, known as the picture element140, that allows authors define what image to load depending on device capabilities and/or other media features. The RICG publishes a use cases and requirements141 document that fully describes the problem.

As a complementary approach, the srcset attribute142, specified by the WHATWG143 and also published as an extension to HTML, let Web developers define the various device pixel ratios of an image, letting the browser pick the best choice for the of the screen. As of January 2014, there is general agreement amongst browser vendors to implement both picture and srcset.

SVG, which lets define images that can be scaled up and down without any loss of quality, is another critical tool to the development of Web applications that adapt to the resolution of the underlying device.

133. http://www.w3.org/TR/DDR-Simple-API/ 134. http://www.w3.org/TR/css3-mediaqueries/ 135. http://dev.w3.org/csswg/mediaqueries4/ 136. http://dev.w3.org/csswg/css-device-adapt/ 137. http://dev.w3.org/csswg/css-values/#viewport-relative-lengths 138. http://dev.w3.org/csswg/css-size-adjust/ 139. http://www.w3.org/community/respimg/ 140. http://www.w3.org/html/wg/drafts/html/master/embedded-content.html#the-picture-element 141. http://usecases.responsiveimages.org/ 142. http://www.w3.org/html/wg/drafts/html/master/embedded-content.html#attr-img-srcset 143. http://www.w3.org/community/whatwg/

16/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 3. DEVICE ADAPTATION

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

145 Device Description Good Coverage Device Device information Repository Simple Rec finished N/A Limited Description144 API

Last updated None October 2014 None Device APIs and Media Capture Media Capture and WD X X X X Web Real-Time Stabilizing Capabilities Streams Communications D J F M A M J J A S O N X X X 2013 2014 Commits on ed. draft

Good coverage147

Widely deployed

3.2+ 2.1+ 10+ 38+ Media Queries Rec Finished Finished

10+ 10+ 32+

146

Last updated None None October 2014

CSS-based Media Queries WD ? ? ? ? CSS Early draft adaptation Level 4148 D J F M A M J J A S O N 2013 2014 ? ? ? Commits on ed. draft

N/A Last updated Limited October 2013

CSS Device WD X X 11.1+ 29+ Early draft Adaptation149 D J F M A M J J A S O N 10+ 2013 2014 X X Commits on ed. draft 150

144. http://www.w3.org/2005/MWI/DDWG/ 145. http://www.w3.org/2005/MWI/DDWG/drafts/api/test-report.html 146. http://docs.webplatform.org/wiki/css/mediaqueries

17/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 3. DEVICE ADAPTATION

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated Good coverage Well deployed viewport relative October 2014 units in CSS Values 8+ 37+ 24+ 38+ CR Mostly finished and Units Module D J F M A M J J A S O N 151 10+ 10+ 32+ Level 3 2013 2014 Commits on ed. draft

Last updated April N/A Very limited 2013 CSS Mobile Text Editors 5.0+ X X X Size Adjustment Early draft D J F M A M J J A S O N Module Level 1 10+ 32+ 2013 2014 X Commits on ed. draft

Last updated Started153 October 2014

Limited

picture element in WD X X X 38+ Responsive images HTML stabilizing HTML 5.1152 X X X

D J F M A M J J A S O N 2013 2014 Commits on ed. draft

147. http://www.w3.org/Style/CSS/Test/MediaQueries/20100726/ 148. http://www.w3.org/TR/mediaqueries-4/ 149. http://www.w3.org/TR/css-device-adapt/ 150. http://docs.webplatform.org/wiki/tutorials/mobile_viewport 151. http://www.w3.org/TR/css3-values/#viewport-relative-lengths 152. http://www.w3.org/TR/html51/embedded-content.html#the-picture-element 153. http://w3c-test.org/html/semantics/embedded-content/the-img-element/update-the-source-set.html

18/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 3. DEVICE ADAPTATION

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated Well started October 2014

Limited but growing

srcset attribute in WD Stabilizing 8+ 37+ 24+ 38+ HTML 5.1154 X X X

D J F M A M J J A S O N 2013 2014 Commits on ed. draft

High coverage Widely deployed Scalable Vector New version of 3.2+ 37+ 10+ 38+ Graphics (SVG) 1.1 SVG Rec Finished SVG (SVG 2.0) in

Specification preparation 10+ 10+ 32+

154. http://www.w3.org/TR/html51/embedded-content.html#attr-img-srcset

19/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 4. FORMS

4. Forms

The ability to build rich forms with HTML is the basis for user input in most Web-based applications. Due to their limited keyboards, text input on mobile devices remains a difficult task for most users; HTML5155 address parts of this problem by offering new type of form controls that optimize the way users will enter data:

• date and time entries156 can take advantage of a number of dedicated form controls (e.g. ) where the user can use a native calendar control; • the 157, and 158 can be used to optimize the ways user enter these often-difficult to type data, e.g. through dedicated virtual keyboards, or by accessing on-device records for these data (from the address book, bookmarks, etc.); • the inputmode159 attribute (proposed in HTML 5.1) defines the type of textual input expected in a text entry; • the pattern160 attribute allows both to guide user input as well as to avoid server-side validation (which requires a network round-trip) or JavaScript-based validation (which takes up more resources); • the placeholder161 attribute allows to guide user input by inserting hints as to what type of content is expected in a text-entry control; • the 162 element allows creating free-text input controls coming with pre-defined values the user can select from; HTML 5.1 defines a mechanism for the autocomplete attribute163 to automatically fill input fields based on well- known data for the user.

155. http://www.w3.org/html/wg/drafts/html/CR/ 156. http://www.w3.org/html/wg/drafts/html/CR/forms.html#date-state-(type=date) 157. http://www.w3.org/html/wg/drafts/html/CR/forms.html#telephone-state-(type=tel) 158. http://www.w3.org/html/wg/drafts/html/CR/forms.html#url-state-(type=url) 159. http://www.w3.org/html/wg/drafts/html/master/forms.html#input-modalities:-the-inputmode-attribute 160. http://www.w3.org/html/wg/drafts/html/CR/forms.html#the-pattern-attribute 161. http://www.w3.org/html/wg/drafts/html/CR/forms.html#the-placeholder-attribute 162. http://www.w3.org/html/wg/drafts/html/CR/forms.html#the-datalist-element 163. http://www.w3.org/html/wg/drafts/html/master/forms.html#autofilling-form-controls:-the-autocomplete-attribute

20/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 4. FORMS

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Just started166 Last updated October 2014 Growing Data and Time Date and time 5.0+ 37+ 10+ 38+ input element in Rec Mostly stable entries 164 HTML5 10+ X X 165 D J F M A M J J A S O N 2013 2014 Commits on ed. draft

Last updated Just started October 2014 Well deployed telephone, email Customized text and URL input 5+ 3+ 11+ 18+ entries (tel, email, Rec Stable element in url) HTML HTML5167 4.7.1+ 10+ 4+ D J F M A M J J A S O N 2013 2014 Commits on ed. draft

Last updated None October 2014

None

inputmode attribute WD ? ? ? ? Input modality Early draft in HTML 5.1168 ? ? ?

D J F M A M J J A S O N 2013 2014 Commits on ed. draft

164. http://www.w3.org/TR/html5/forms.html#date-state-(type=date) 165. http://docs.webplatform.org/wiki/guides/html5_form_features 166. http://w3c-test.org/html/semantics/forms/the-input-element 167. http://www.w3.org/TR/html5/forms.html#telephone-state-(type=tel) 168. http://www.w3.org/TR/html51/forms.html#input-modalities:-the-inputmode-attribute

21/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 4. FORMS

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated Just started October 2014 Limited but growing

pattern attribute in Rec Input pattern Stable X X 11+ 18+ HTML5169

4.7.1+ X 4+ D J F M A M J J A S O N 2013 2014 Commits on ed. draft

171 Last updated Started October 2014 Well deployed placeholder 3.2+ 2.1+ 11+ 38+ Input hint attribute in Rec Stable 170 HTML5 10+ 10+ 32+

D J F M A M J J A S O N 2013 2014 Commits on ed. draft

Last updated None173 October 2014 Growing

Autocomplete for datalist element in X 37+ 10+ 38+ Rec Stable text entries HTML5172 10+ ? 32+

D J F M A M J J A S O N 2013 2014 Commits on ed. draft

169. http://www.w3.org/TR/html5/forms.html#the-pattern-attribute 170. http://www.w3.org/TR/html5/forms.html#the-placeholder-attribute 171. http://w3c-test.org/html/semantics/forms/the-input-element/ 172. http://www.w3.org/TR/html5/forms.html#the-datalist-element 173. http://w3c-test.org/html/semantics/forms/the-datalist-element/

22/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 4. FORMS

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated None October 2014

None autocomplete WD ? ? ? 31+ attribute in HTML Early draft 5.1174 ? ? ?

D J F M A M J J A S O N 2013 2014 Commits on ed. draft

174. http://www.w3.org/TR/html51/forms.html#autofilling-form-controls:-the-autocomplete-attribute

23/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 5. USER INTERACTIONS

5. User interactions

An increasing share of mobile devices relies on touch-based interactions. While the traditional interactions recognized in the Web platform (keyboard, mouse input) can still be applied in this context, a more specific handling of touch-based input is a critical aspect of creating well-adapted user experiences, which Touch Events in the DOM175 () enable. The work on that specification is now nearly finished.

Meanwhile, the Pointer Events Working Group176 has made good progress on an alternative approach to handle user input, Pointer Events177, that allows to handle mouse, touch and pen events under a single model. This new approach was expected to replace the currently more widely deployed Touch Events, but recent developments178 show a less clear picture where a mix of Touch and Pointer Events will remain.

In particular, the CSS property touch-action179 that lets filter gesture events on elements is gaining traction beyond implementations of Pointer Events.

As more and more content gets rendered as long scrollable lists, more and more logic is attached to scrolling events, and the quality of the user experience of these actions is highly dependent on their performances. The CSSOM View Module180 determines when scrolling events get fired, and let developers specify the type of scrolling behavior they want.

The proposed work on CSS Scroll Snap Points181 adds greater ability to control the behavior of panning and scrolling by defining points to which an app view would snap when the user moves through the page.

The CSS will-change property is also available to indicate to browsers that a given part of the page will be soon scrolled to and should be pre-rendered.

Many mobile devices use on-screen keyboards to let users type; the Input Method Editor (IME) API182 makes it possible to coordinate the interactions between that on-screen keyboard and Web applications.

Conversely, many mobile devices use haptic feedback (such as vibration) to create new form of interactions (e.g. in games); work on a vibration API183 in the Device APIs Working Group is making good progress.

But as the Web reaches new devices, and as devices gain new user interactions mechanisms, it also becomes important to allow Web developers to react to a more abstract set of user interactions: instead of having to work in terms of “click”, “key press”, or “touch event”, being able to react to an “undo” command, or a “next page” command independently of how the user instructed it to the device will prove beneficial to the development of device-independent Web applications. The IndieUI Events184 specification, developed by the Indie UI Working Group185, aims at addressing this need.

Mobile devices follow their users everywhere, and many mobile users rely on them to remind them or notify them of events, such as messages: the Web Notifications186 specification enables that feature in the Web environment, while the Push API187 makes it possible for server-side notifications to alert the user, even if the browser is not running.

Mobile devices, and mobile phones in particular, are also in many cases well-suited to be used through voice-interactions; the Speech API Community Group188 is exploring the opportunity of starting standardization work around a JavaScript API189 that would make it possible for users to interact with a Web page through spoken commands.

175. https://dvcs.w3.org/hg/webevents/raw-file/tip/touchevents.html 176. http://www.w3.org/2012/pointerevents/ 177. https://dvcs.w3.org/hg/pointerevents/raw-file/tip/pointerEvents.html 178. http://lists.w3.org/Archives/Public/public-pointer-events/2014JulSep/0051.html 179. https://dvcs.w3.org/hg/pointerevents/raw-file/tip/pointerEvents.html#the-touch-action-css-property 180. http://dev.w3.org/csswg/cssom-view/#scrolling 181. http://dev.w3.org/csswg/css-snappoints/ 182. https://dvcs.w3.org/hg/ime-api/raw-file/default/Overview.html 183. http://dev.w3.org/2009/dap/vibration/ 184. https://dvcs.w3.org/hg/IndieUI/raw-file/default/src/indie-ui-events.html 185. http://www.w3.org/WAI/IndieUI/ 186. https://dvcs.w3.org/hg/notifications/raw-file/tip/Overview.html 187. http://w3c.github.io/push-api/ 188. http://www.w3.org/community/speech-api/ 189. https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html

24/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 5. USER INTERACTIONS

Whether users are speaking commands to their apps or working with them through non-haptic interactions, they risk seeing the screens turned off automatically by their devices screensaver. An early proposal for a Wake Lock API190 would let developers signal the needs to keep the screen up in these circumstances.

The hardware constraints of mobile devices, and their different usage context can make mobile users experience similar barriers to people with disabilities191. These similarities in barriers mean that similar solutions can be used to cater for them, making a Web site accessible both for people with disabilities and mobile devices192 a natural goal (as detailed in Relationship between Mobile Web Best Practices and WCAG193).

How Web Content Guidelines (WCAG) and Accessibility Guidelines (UAAG) provide guidance on mobile accessibility — that is, making websites and applications more accessible to people with disabilities when they are using mobile phones and a broad range of other devices — is discussed in Mobile Accessibility194.

WAI-ARIA195 provides semantic information on widgets, structures and behaviors hooks to make Web applications more accessible, including on mobile devices.

190. http://w3c.github.io/wake-lock/ 191. http://www.w3.org/WAI/mobile/experiences 192. http://www.w3.org/WAI/mobile/overlap 193. http://www.w3.org/TR/mwbp-wcag/ 194. http://www.w3.org/WAI/mobile/ 195. http://www.w3.org/WAI/PF/aria/

25/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 5. USER INTERACTIONS

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Complete199

Last updated July Largely deployed 2014 3.2+ 2.1+ 11+ 38+ Touch Events196 Web Events197 Rec Finished D J F M A M J J A S O N 10+ 32+ 2013 2014 X 198 Commits on ed. draft

Well started202 Limited deployment Touch-based Last updated and limited planned interactions October 2014 ones 200 LCWD Pointer Events Stable X X X X D J F M A M J J A S O N 2013 2014 Commits on ed. draft X 11+ X 201 Pointer Events Good covergae Last updated Limited deployment October 2014 but growing touch-action LCWD property in Pointer Stable X 37+ 24+ 38+ Events203 D J F M A M J J A S O N 2013 2014 X 10+ X Commits on ed. draft

196. http://www.w3.org/TR/touch-events/ 197. http://www.w3.org/2010/webevents/ 198. http://docs.webplatform.org/wiki/tutorials/mobile_touch 199. http://w3c-test.org/touch-events/ 200. http://www.w3.org/TR/pointerevents/ 201. http://docs.webplatform.org/wiki/concepts/PointerEvents 202. http://w3c-test.org/pointerevents/ 203. http://www.w3.org/TR/pointerevents/#the-touch-action-css-property

26/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 5. USER INTERACTIONS

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated N/A None October 2014 smooth scrolling in WD X X X X CSSOM View Still changing Module204 D J F M A M J J A S O N 2013 2014 X X X Commits on ed. draft

Last updated None Experimental November 2014 CSS Scroll Snap Editors X X X X Smooth scrolling Points Module CSS Early draft D J F M A M J J A S O N Level 1 10+ 2013 2014 X X Commits on ed. draft

Last updated A few experimental N/A August 2014 ones

CSS Will Change WD Early draft X 37+ 24+ 38+ Module Level 1 D J F M A M J J A S O N 2013 2014 X X X Commits on ed. draft

Last updated April N/A Very limited 2014 On-screen Input Method WD X X X X keyboard Web Applications Still changing Editor API205 D J F M A M J J A S O N interactions 11+ 2013 2014 X X Commits on ed. draft

Last updated Started207 Growing November 2014

CR X 37+ 24+ 38+ Vibration Vibration API206 Device APIs Mostly stable D J F M A M J J A S O N 10+ 32+ 2013 2014 X Commits on ed. draft

204. http://www.w3.org/TR/cssom-view/ 205. http://www.w3.org/TR/ime-api/ 206. http://www.w3.org/TR/vibration/ 207. http://w3c-test.org/vibration/

27/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 5. USER INTERACTIONS

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated June None None 2014

Intent-based IndieUI: Events Independent User WD X X X X Early draft events 1.0208 Interface (Indie UI) D J F M A M J J A S O N 2013 2014 X X X Commits on ed. draft

Last updated Growing None211 August 2013 deployment Web 210 LCWD Web Notification Stabilizing X 37+ 24+ X Notifications209 D J F M A M J J A S O N 2013 2014 10+ X 32+ Commits on ed. draft

Notification Last updated N/A October 2014 None Early draft, now WD X X X X Push API212 Web Applications with Service Workers D J F M A M J J A S O N X X X 2013 2014 Commits on ed. draft

Last updated Limited but N/A January 2013 growing Speech-based Speech API Web Speech API N/A N/A 7.0+ X X 38+ interactions Community Group D J F M A M J J A S O N 2013 2014 X X X Commits on ed. draft

Last updated N/A November 2014 None X X X X Screen wake Wake Lock API Device APIs N/A Unofficial draft X X X D J F M A M J J A S O N 2013 2014 Commits on ed. draft

208. http://www.w3.org/TR/indie-ui-events/ 209. http://www.w3.org/TR/notifications/ 210. http://www.w3.org/2010/web-notifications/ 211. http://w3c-test.org/notifications/ 212. http://www.w3.org/TR/push-api/

28/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 5. USER INTERACTIONS

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Relationship N/A between Mobile Web Best Practices Education and (MWBP) and Web Outreach213 and NOTE Finished N/A N/A Content Mobile Web Best Accessibility Practices214 Accessibility Guidelines (WCAG)

Well deployed Well started217 Accessible Rich Internet Protocols and Last updated 3.2+ 37+ 10+ 38+ Rec Stable Applications (WAI- Formats216 February 2014 ARIA) 1.0215 X 10+ 32+

213. http://www.w3.org/WAI/EO/ 214. http://www.w3.org/2005/MWI/BPWG/ 215. http://www.w3.org/TR/wai-aria/ 216. http://www.w3.org/WAI/PF/ 217. https://dvcs.w3.org/hg/pfwg/file/default/ARIA/1.0/tests/test-files/

29/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 6. DATA STORAGE

6. Data storage

A critical component of many applications is the ability to save state, export content, as well as integrate data from other files and services on the system.

For simple data storage, the Web Storage218 specification offers two basic mechanisms, localStorage and sessionStorage, that can preserve data respectively indefinitely, or on a browser-session basis.

For richer interactions, the Web platform provides the File Reader API219 makes it possible to load the content of a file.

Discussions have started on a new proposal for a sandboxed filesystem API220.

Meanwhile, the HTML5 download attribute221 provides a simply mechanism to trigger a file download (rather than a page navigation), with the possibility of setting a user-friendly filename.

On top of this file-based access, the Indexed Database API222 (IndexedDB) defines a database of values and hierarchical objects that integrates naturally with JavaScript, and can be queried and updated very efficiently - a new version of the specification223 is under consideration. Note that the work around a client-side SQL-based database224, which had been started in 2009, has been abandoned in favor of this new system.

As more and more data need to be stored by the browser (e.g. for offline usage), it becomes critical for developers to get reliable storage space, which the proposed Quota Management API225 will offer to Web applications.

Likewise, as some of this data need to be encrypted, the Web Cryptography API226 from the Web Cryptography Working Group227 exposes strong cryptography primitives to Web applications, and can be bound to pre-provisioned keys via the WebCrypto Key Discovery228 API.

218. http://dev.w3.org/html5/webstorage/ 219. http://dev.w3.org/2006/webapi/FileAPI/ 220. http://w3c.github.io/filesystem-api/Overview.html 221. http://www.w3.org/html/wg/drafts/html/CR/links.html#attr-hyperlink-download 222. https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html 223. http://www.w3.org/2008/webapps/wiki/IndexedDatabaseFeatures 224. http://www.w3.org/TR/webdatabase/ 225. https://dvcs.w3.org/hg/quota/raw-file/tip/Overview.html 226. http://www.w3.org/2012/webcrypto/WebCryptoAPI/ 227. http://www.w3.org/2012/webcrypto/ 228. https://dvcs.w3.org/hg/webcrypto-keydiscovery/raw-file/tip/Overview.html

30/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 6. DATA STORAGE

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Complete231 Last updated May Well deployed 2014 Simple data 3.2+ 2.1+ 11+ 38+ Web Storage229 Rec Finished storage D J F M A M J J A S O N 10+ 10+ 32+ 2013 2014 Commits on ed. draft 230

Last updated Getting well Started233 October 2014 Web Applications deployed 232 LCWD File API Stabilizing 6.0+ 3+ 11.1+ 38+ D J F M A M J J A S O N 2013 2014 10+ 10+ 32+ Commits on ed. draft

Last updated None October 2014 FileSystem API N/A Early proposal N/A D J F M A M J J A S O N File operations 2013 2014 Commits on ed. draft

Last updated None235 October 2014 Growing

download attribute X 37+ 24+ 38+ HTML Rec Stable in HTML5234 10+ X 32+

D J F M A M J J A S O N 2013 2014 Commits on ed. draft

229. http://www.w3.org/TR/webstorage/ 230. http://docs.webplatform.org/wiki/tutorials/offline_storage 231. http://w3c-test.org/webstorage/ 232. http://www.w3.org/TR/FileAPI/ 233. http://w3c-test.org/FileAPI/ 234. http://www.w3.org/TR/html5/links.html#attr-hyperlink-download 235. http://w3c-test.org/html/semantics/links/downloading-resources/

31/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 6. DATA STORAGE

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Good coverage237

Last updated Well deployed November 2014 Indexed Database 8+ 37+ 24+ 38+ CR Stable API236 D J F M A M J J A S O N 10+ 10+ 32+ 2013 2014 Commits on ed. draft

Database query/ update N/A Somewhat Web Applications deployed, but won’t be further deployed Web SQL Database Retired Abandoned N/A 3.2+ 2.1+ 11+ 38+

10+ X X

Last updated None Very limited February 2014

Quota Management WD X X X 18+ Quota for storage Early work API238 D J F M A M J J A S O N 2013 2014 X X X Commits on ed. draft

Last updated None240 November 2014 Well deployed

Web Cryptography LCWD 8+ 37+ 24+ 38+ Encrypted storage Web Cryptography Stabilizing API239 X 11+ 19+ D J F M A M J J A S O N 2013 2014 Commits on ed. draft

236. http://www.w3.org/TR/IndexedDB/ 237. http://w3c-test.org/IndexedDB/ 238. http://www.w3.org/TR/quota-api/ 239. http://www.w3.org/TR/WebCryptoAPI/ 240. http://w3c-test.org/WebCryptoAPI/

32/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 6. DATA STORAGE

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated May None None 2014

WebCrypto Key WD X X X X Early work Discovery241 D J F M A M J J A S O N 2013 2014 X X X Commits on ed. draft

241. http://www.w3.org/TR/webcrypto-key-discovery/

33/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 7. PERSONAL INFORMATION MANAGEMENT

7. Personal Information Management

Applications can benefit from integrating with their users’ existing data records; on mobile devices, the address book and calendar are particularly useful source of information.

For Web apps outside of the browser, a purely programmatic approach is part of the System Applications Working Group242, with work on a Contacts Manager API243 in progress.

In the browser, HTML 5.1 provides autocompleted fields for contacts information that would let browsers re-use data from addressbooks.

242. http://www.w3.org/2012/05/sysapps-wg-charter.html 243. http://www.w3.org/2012/sysapps/contacts-manager-api/

34/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 7. PERSONAL INFORMATION MANAGEMENT

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated April None None 2014

Contacts Manager System WD ? ? ? ? Early draft API244 Applications245 D J F M A M J J A S O N 2013 2014 ? ? ? Commits on ed. draft

Last updated None October 2014 Addressbook data None autocomplete WD ? ? ? 31+ attribute in HTML HTML Early draft 5.1 ? ? ?

D J F M A M J J A S O N 2013 2014 Commits on ed. draft

244. http://www.w3.org/TR/contacts-manager-api/ 245. http://www.w3.org/2012/sysapps/

35/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 8. SENSORS AND HARDWARE INTEGRATION

8. Sensors and hardware integration

Mobile devices are packed with sensors, making them a great bridge between the real and virtual worlds: GPS, accelerometer, ambient light detector, microphone, camera, thermometer, etc.

To take full advantage of these sensors in mobile Web applications, Web developers need to be provided with hooks to interact with them.

The Geolocation API246 provides a common interface for locating the device, independently of the underlying technology (GPS, WIFI networks identification, triangulation in cellular networks, etc.). Work towards a new version of the API that would include geofencing is under consideration247.

Web applications can also now access orientation and acceleration data via the DeviceOrientation Event Specification248.

A number of APIs for other sensors are under development: the Battery Status API249, the Proximity Events API250, the Ambient Light Events API251 or the proposed Ambient Humidity Events API252. The Device APIs Working Group has started an effort253 to propose a unification pattern for these various sensors.

As already mentioned in the section on multimedia, there is ongoing work on APIs to open up access to camera and microphone streams.

The opportunity for Web applications to use Near-Field Communications (NFC) mechanisms have led to the chartering of the NFC Working Group254 to develop a Web NFC API255.

A more global access to sensors and hardware (including USB and bluetooth) is in scope for the System Applications Working Group. A Web Bluetooth Community Group256 was recently started to develop a Bluetooth API for browsers257 with a particular goal of supporting Bluetooth Low Energy devices.

246. http://dev.w3.org/geo/api/spec-source.html 247. http://lists.w3.org/Archives/Public/public-geolocation/2014Jan/0008.html 248. http://w3c.github.io/deviceorientation/spec-source-orientation.html 249. https://dvcs.w3.org/hg/dap/raw-file/tip/battery/Overview.html 250. https://dvcs.w3.org/hg/dap/raw-file/tip/proximity/Overview.html 251. http://w3c.github.io/ambient-light/ 252. https://dvcs.w3.org/hg/dap/raw-file/tip/humidity/Overview.html 253. https://github.com/w3c/sensors 254. http://www.w3.org/2012/nfc/ 255. http://w3c.github.io/nfc/proposals/common/nfc.html 256. http://www.w3.org/community/web-bluetooth/ 257. https://webbluetoothcg.github.io/web-bluetooth/

36/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 8. SENSORS AND HARDWARE INTEGRATION

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Good coverage261

Last updated July Widely deployed 2014 Geolocation API 3.2+ 2.1+ 11+ 38+ Geolocation Rec Finished Specification258 D J F M A M J J A S O N 10+ 10+ 32+ 2013 2014 260 Commits on ed. draft

Geolocation259 Started264

Last updated Well deployed August 2014 DeviceOrientation LCWD Stabilizing, but with 4.2+ 3+ 12+ 38+ Motion sensors Event planned updates 262 D J F M A M J J A S O N Specification 10+ 11+ 32+ 2013 2014 263 Commits on ed. draft

Last updated Good coverage266 Limited November 2014 Battery Status LCWD X X X 38+ Battery Status Device APIs Stable API265 D J F M A M J J A S O N 32+ 2013 2014 X X Commits on ed. draft

258. http://www.w3.org/TR/geolocation-API/ 259. http://www.w3.org/2008/geolocation/ 260. http://docs.webplatform.org/wiki/tutorials/geolocation-trip-meter 261. http://w3c-test.org/geolocation-API/ 262. http://www.w3.org/TR/orientation-event/ 263. http://docs.webplatform.org/wiki/tutorials/device_orientation 264. https://dvcs.w3.org/hg/geo/file/tip 265. http://www.w3.org/TR/battery-status/ 266. http://w3c-test.org/battery-status/

37/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 8. SENSORS AND HARDWARE INTEGRATION

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated April Started268 Very limited 2014

CR Likely to evolve X X X X Proximity sensors Proximity Events267 substantially D J F M A M J J A S O N 32+ 2013 2014 X X Commits on ed. draft

Last updated Started270 Very limited September 2014 Ambient Light Ambient Light LCWD Likely to evolve X X X X sensor Events269 significantly D J F M A M J J A S O N 32+ 2013 2014 X X Commits on ed. draft

Last updated N/A None October 2013 Ambient Humidity X X X X Humidity sensor N/A Unofficial draft Events D J F M A M J J A S O N 2013 2014 X X X Commits on ed. draft

Last updated well started Limited but October 2014 growing Camera & Device APIs and Media Capture and WD Microphone Web Real-Time Stabilizing X 37+ 12+ 38+ Streams streams Communications D J F M A M J J A S O N 10+ 32+ 2013 2014 X Commits on ed. draft

Last updated None None October 2014

Near Field WD X X X X NFC Web NFC API271 Very early draft Communications D J F M A M J J A S O N 2013 2014 X X X Commits on ed. draft

267. http://www.w3.org/TR/proximity/ 268. http://w3c-test.org/proximity/ 269. http://www.w3.org/TR/ambient-light/ 270. http://w3c-test.org/ambient-light/ 271. http://www.w3.org/TR/nfc/

38/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 8. SENSORS AND HARDWARE INTEGRATION

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated N/A October 2014 None Web Bluetooth Not on standards X X X X Bluetooth Web Bluetooth Community Early draft 272 track Group D J F M A M J J A S O N X X X 2013 2014 Commits on ed. draft

272. https://www.w3.org/community/web-bluetooth/

39/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 9. NETWORK

9. Network

Network connectivity represents a major asset for mobile devices: the Web is an immense store of content, as well as an almost endless source of processing power, overcoming two of the limitations of mobile devices.

The Web platform is growing a number of APIs that facilitate establishing network connectivity in different contexts.

XMLHttpRequest273 (the basis for development) is a widely deployed API to load content from Web servers using the HTTP and HTTPs protocol: the W3C specification (formerly known as XMLHttpRequest Level 2) completes the existing deployed API with the ability to make requests on servers in a different domain, programmatic feedback on the progress of the network operations, and more efficient handling of binary content.

The recently started Beacon274 API would let developers queue unsupervised HTTP requests, leaving it to the browser to execute them when appropriate, opening the door for better network optimizations.

Early work on a Web Background Synchronization API275 would provide a robust Service Worker-based mechanism to enable Web applications to download and upload content in the background, even in the absence of a running browser.

By default, browsers do not allow to make request across different domains (or more specifically, across different origins, a combination of the protocol, domain and port) from a single Web page; this rule protects the user from having a Web site abusing their credentials and stealing their data on another Web site. Sites can opt-out of that rule by making use of the Cross-Origin Resource Sharing276 mechanism, opening up much wider cooperation across Web applications and services.

XMLHttpRequest is useful for client-initiated network requests, but mobile devices with their limited network capabilities and the cost that network requests induce on their battery (and sometimes on their users bill) can often make better use of server- initiated requests. The Server-Sent Events277 API allows triggering DOM events based on push notifications (via HTTP and other protocols.)

Early work on a Push API would allow Web applications to receive server-sent messages whether or not the said Web app is active in a browser window. An IETF Working Group charter278 is under discussion to standardize the protocol aspects of the mechanism.

The WebSocket API279, built on top of the IETF WebSocket protocol280, offers a bidirectional, more flexible, and less resource intensive network connectivity than XMLHttpRequest.

The work on Web Real-Time Communications281 will also provide direct peer-to-peer data connections between browsers with real-time characteristics, opening the way to collaborative multi-devices Web applications.

Of course, an important part of using network connectivity relies on being able to determine if such connectivity exists, and the type of network available. The HTML5 onLine DOM flag282 (and its associated change event, ononline) signals when network connectivity is available to the Web environment.

The network-information API283, which was supposed to address discovery of the network characteristics, has been abandoned for the time being due to lack of clear supporting use cases284.

The Resource Timing285 API offers to measure precisely the impact of the network on the time needed to load various resources, offering another approach to adapt a Web app to its network environment.

273. https://dvcs.w3.org/hg/xhr/raw-file/tip/xhr-1/Overview.html 274. http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/Beacon/Overview.html 275. https://github.com/slightlyoff/BackgroundSync/blob/master/explainer.md 276. https://dvcs.w3.org/hg/cors/raw-file/tip/Overview.html 277. http://dev.w3.org/html5/eventsource/ 278. http://www.ietf.org/mail-archive/web/webpush/current/msg00007.html 279. http://dev.w3.org/html5/websockets/ 280. http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-05 281. http://w3c.github.io/webrtc-pc/ 282. http://www.w3.org/html/wg/drafts/html/CR/browsers.html#browser-state 283. https://w3c.github.io/netinfo/ 284. http://w3c-webmob.github.io/netinfo-usecases/ 285. http://w3c.github.io/resource-timing/1

40/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 9. NETWORK

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated May Well started287 Well deployed 2014 XMLHttpRequest 5.0+ 3+ 12+ 38+ Web Applications WD stabilizing Level 1286 D J F M A M J J A S O N 10+ 10+ 32+ 2013 2014 Commits on ed. draft

Last updated Limited but N/A February 2014 growing HTTP(s) network 288 LCWD Beacon Web Performance Early draft X X X 39+ API D J F M A M J J A S O N 2013 2014 X X 31+ Commits on ed. draft

Last updated None None November 2014 Web Background X X X X Web Applications N/A Early draft Synchronization D J F M A M J J A S O N 2013 2014 X X X Commits on ed. draft

Well started292 Last updated June Getting well- Web Applications 2012 deployed

Cross-domain Cross-Origin and Rec Stable 3.2+ 2.1+ 12+ 38+ requests Resource Sharing289 Web Application D J F M A M J J A S O N 290 Security 2013 2014 10+ 10+ 32+ Commits on ed. draft 291

286. http://www.w3.org/TR/XMLHttpRequest/ 287. http://w3c-test.org/XMLHttpRequest/tests/ 288. http://www.w3.org/TR/beacon/ 289. http://www.w3.org/TR/cors/ 290. http://www.w3.org/2011/webappsec/ 291. http://docs.webplatform.org/wiki/tutorials/using_cors 292. http://w3c-test.org/cors/

41/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 9. NETWORK

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Good coverage295 Last updated May Getting well- 2014 deployed

Server-Sent CR Stable 4.0+ 37+ 11.1+ 38+ Events293 D J F M A M J J A S O N 2013 2014 10+ X 32+ Commits on ed. draft Server-pushed 294 requests Last updated N/A October 2014 None Early draft, now WD X X X X Push API with Service Workers Web Applications D J F M A M J J A S O N X X X 2013 2014 Commits on ed. draft

Well started298

Last updated June Good deployment 2014 Bidirectional The WebSocket 6.0+ 37+ 12.1+ 38+ CR Stable connections API296 D J F M A M J J A S O N 10+ 10+ 32+ 2013 2014 297 Commits on ed. draft

293. http://www.w3.org/TR/eventsource/ 294. http://docs.webplatform.org/wiki/tutorials/eventsource_basics 295. http://w3c-test.org/eventsource/ 296. http://www.w3.org/TR/websockets/ 297. http://docs.webplatform.org/wiki/tutorials/websockets_basics 298. http://w3c-test.org/websockets/

42/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 9. NETWORK

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

None Last updated Limited but WebRTC 1.0: Real- October 2014 growing time P2P data Web Real-Time WD Communication Early draft X 37+ 24+ 38+ connections Communications Between D J F M A M J J A S O N Browsers299 2013 2014 X X 32+ Commits on ed. draft 300

Last updated None302 October 2014 Limited

onLine state in X 2.2+ X 18+ on-line state HTML Rec Stable HTML5301 X 8+ X

D J F M A M J J A S O N 2013 2014 Commits on ed. draft

Last updated None Very limited November 2014 Abandoned for The Network X 2.2+ X X Device APIs Retired now, but might be Information API303 D J F M A M J J A S O N restarted 10+ 10+ 2013 2014 X Commits on ed. draft Network characteristics Last updated Well started305 Growing October 2014

CR X 37+ 24+ 38+ Resource Timing304 Web Performance Stable D J F M A M J J A S O N 10+ 2013 2014 X X Commits on ed. draft

299. http://www.w3.org/TR/webrtc/ 300. http://docs.webplatform.org/wiki/concepts/internet_and_web/webrtc 301. http://www.w3.org/TR/html5/browsers.html#browser-state 302. http://w3c-test.org/html/browsers/offline/browser-state 303. http://www.w3.org/TR/netinfo-api/ 304. http://www.w3.org/TR/resource-timing/ 305. http://w3c-test.org/resource-timing/

43/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 10. COMMUNICATION AND DISCOVERY

10. Communication and Discovery

Beyond connection to on-line services, allowing communications between users, but also between devices and between applications is an important aspect of a good mobile development platform. To communicate with unknown devices or pre- existing services, a discovery component is critical.

For Web apps not in a browser, the System Applications Working Group is working on a complete Messaging API306.

The postMessage API of HTML5 Web Messaging307 allows for Web Applications to communicate between each other.

The Network Service Discovery API offers to discover services on the local network (such as the ones offered via DLNA), enabling mobile Web applications to integrate seamlessly with these services.

An alternative proposal to the Network Service Discovery API has emerged: Named Web Sockets308 offers to provide well- known sockets to existing and approved local network services.

The Second Screen Presentation Working Group309 is building an an API to request display of content on an external screen310, including through network-based protocols, forming the basis for second-screen scenarios.

The Web Real-Time Communications Working Group is the host of specifications for a wider set of communication opportunities:

• Peer-to-peer connection across devices, • P2P Audio and video streams allowing for real-time communications between users.

306. http://www.w3.org/2012/sysapps/messaging/ 307. http://dev.w3.org/html5/postmsg/ 308. https://github.com/namedwebsockets/namedwebsockets 309. http://www.w3.org/2014/secondscreen/ 310. http://w3c.github.io/presentation-api/

44/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 10. COMMUNICATION AND DISCOVERY

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated None None November 2013

Emails, SMS and System WD ? ? ? ? Messaging API311 First draft MMS Applications D J F M A M J J A S O N 2013 2014 ? ? ? Commits on ed. draft

Last updated May Good coverage313 Well deployed 2014 Inter-app HTML5 Web 3.2+ 2.1+ 10+ 38+ Web Applications CR Stable communications Messaging312 D J F M A M J J A S O N 10+ 10+ 32+ 2013 2014 Commits on ed. draft

Last updated None None February 2014

Network Service WD Early draft, unsure X X X X Discovery future D J F M A M J J A S O N 2013 2014 X X X Commits on ed. draft Device APIs Last updated None November 2014 None Local network Named Web X X X X N/A Early proposal services Sockets D J F M A M J J A S O N X X X 2013 2014 Commits on ed. draft

Last updated N/A October 2014 Second Screen Presentation API N/A Editors draft None Presentation D J F M A M J J A S O N 2013 2014 Commits on ed. draft

311. http://www.w3.org/TR/messaging/ 312. http://www.w3.org/TR/webmessaging/ 313. http://w3c-test.org/webmessaging/

45/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 10. COMMUNICATION AND DISCOVERY

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

None Last updated Limited but WebRTC 1.0: Real- October 2014 growing P2P connections time Web Real-Time WD and audio/video Early draft X 37+ 24+ 38+ Communication Communications streams D J F M A M J J A S O N Between Browsers 2013 2014 X X 32+ Commits on ed. draft

46/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 11. PACKAGING

11. Packaging

An important aspect of the user experience of applications is linked to how the user perceives the said application is available permanently (even when off-line, which is particularly important on mobile devices), as well as how it can be shared and distributed, typically through purchases via applications stores — this is adequately addressed by packaging the application.

The Web platform offers two complementary approaches to packaging Web applications:

• HTML5’s ApplicationCache314 enables access to Web applications off-line through the definition of a manifest of files that the browser is expected to keep in its cache; while relatively well deployed, the current approach has shown some strong limitations and the HTML and Web Applications Working Groups are considering a potentially major overhaul of the technology, likely based on ServiceWorker315 • a JSON-based manifest format316 in development by the the Web Apps Working Group. The System Applications Working Group was building a runtime and security model317 on top of that packaging, but is now instead defining an application lifecycle specification318 based on top of Service Workers.

314. http://www.w3.org/html/wg/drafts/html/CR/browsers.html#appcache 315. https://slightlyoff.github.io/ServiceWorker/spec/service_worker/ 316. http://www.w3.org/2008/webapps/manifest/ 317. http://www.w3.org/2012/sysapps/runtime/ 318. http://www.w3.org/2012/sysapps/app-lifecycle/

47/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 11. PACKAGING

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

None321 Last updated October 2014 Well deployed Stable (but Service ApplicationCache Workers will be the 3.2+ 2.1+ 11+ 38+ HTML Rec in HTML5319 preferred approach when available) 10+ 10+ 32+ 320 D J F M A M J J A S O N 2013 2014 Offline Web apps Commits on ed. draft

Last updated Stubs323 November 2014 None

WD X X X X Service Workers322 Early draft X X X D J F M A M J J A S O N 2013 2014 Commits on ed. draft

Web Applications Last updated N/A November 2014 Limited Manifest for web WD X X X 39+ apps and Early draft bookmarks324 X X X

Packaged Web D J F M A M J J A S O N 2013 2014 App Commits on ed. draft

Last updated March N/A N/A Runtime and Early draft, will 2014

Security Model for System WD likely be replaced ? ? ? ? Web Applications by a different D J F M A M J J A S O N 325 Applications approach 2013 2014 ? ? ? Commits on ed. draft

319. http://www.w3.org/TR/html5/browsers.html#appcache 320. http://docs.webplatform.org/wiki/tutorials/appcache_beginner

48/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 11. PACKAGING

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated May N/A 2014 Application Lifecycle and N/A Early draft N/A Events D J F M A M J J A S O N 2013 2014 Commits on ed. draft

321. http://w3c-test.org/html/browsers/offline/appcache 322. http://www.w3.org/TR/service-workers/ 323. http://w3c-test.org/service-workers/ 324. http://www.w3.org/TR/appmanifest/ 325. http://www.w3.org/TR/runtime/

49/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 12. PAYMENT

12. Payment

Native mobile application stores have made it much easier for developers to monetize some of their applications, either by selling the application itself to users, or by providing in-app purchases.

While Web applications can use well-known on-line payment solutions, these solutions have so far proved much harder to use on mobile devices.

In March 2014, W3C organized a workshop on Web payments326 to identify ways in which standards could help make that payment experience much simpler, in particular on mobile devices. In Octobober 2014, W3C chartered327 the Web Payment Interest Group328 to drive work in this space.

Meanwhile, HTML5.1 provides specific help for autocomplete of credit card details329, making it easier to pay via credit cards once these details have been entered once.

326. http://www.w3.org/2013/10/payments/ 327. http://www.w3.org/2014/04/payments/webpayments_charter.html 328. http://www.w3.org/Payments/IG/ 329. http://www.w3.org/html/wg/drafts/html/master/forms.html#attr-fe-autocomplete-cc-name

50/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 12. PAYMENT

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated None October 2014

Very limited Credit card details Integrated WD ? ? ? 31+ autocomplete in HTML Early draft payment HTML 5.1330 ? ? ?

D J F M A M J J A S O N 2013 2014 Commits on ed. draft

330. http://www.w3.org/TR/html51/forms.html#attr-fe-autocomplete-cc-name

51/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 13. PERFORMANCE & OPTIMIZATION

13. Performance & Optimization

Due to their limited CPU, and more importantly to their limited battery, mobile devices require a lot of attention in terms of performance.

The work started by the Web Performance Working Group on Navigation Timing331, Resource Timing, Performance Timeline332 and User Timing333, gives tools to Web developers for optimizing their Web applications.

The early work on a Resource Priorities334 specification, part of the Web Performance Working Group charter335, would have let developers indicate which network requests should be prioritized, has now been abandoned. It is replaced by the Resource Hints336 specification, which let developers indicate what resources should be downloaded when the browser can afford it.

The proposed work on Efficient Script Yielding337 offers the opportunity to Web developers to use more efficiently asynchronous programming, but has so far gained very limited traction.

The API to determine whether a Web page is being displayed338 (Page Visibility API) can also be used to adapt the usage of resources to the need of the Web application, for instance by reducing network activity when the page is minimized. Likewise, the Timing control for script-based animations API can help reduce the usage of resources needed for playing animations.

Beyond optimization of resources, the perceived reactivity of an application is also a critical aspect of the mobile user experience. The thread-like mechanism made possible via Web Workers339 allows keeping the user interface responsive by offloading the most resource-intensive operations into a background process.

The battery API allows adjusting the use of resources to the current level of power available in the battery of a .

The Mobile Web Application Best Practices340 provide general advice on how to build Web applications that work well on mobile devices, taking into account in particular the needs for optimization. The opportunity to update these best practices is under discussion341 in the Web and Mobile Interest Group342.

331. http://www.w3.org/TR/navigation-timing/ 332. http://www.w3.org/TR/performance-timeline/ 333. http://www.w3.org/TR/user-timing/ 334. https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/ResourcePriorities/Overview.html 335. http://www.w3.org/2013/01/webperf.html 336. http://w3c.github.io/resource-hints/ 337. https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/setImmediate/Overview.html 338. http://www.w3.org/TR/page-visibility/ 339. http://dev.w3.org/html5/workers/ 340. http://www.w3.org/TR/mwabp/ 341. https://github.com/w3c-webmob/mobile_best_practices 342. http://www.w3.org/Mobile/IG/

52/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 13. PERFORMANCE & OPTIMIZATION

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Well deployed Good coverage343

8+ 37+ 24+ 38+ Navigation Timing Rec Finished Finished

10+ 10+ 32+

Last updated Well started Growing October 2014

CR X 37+ 24+ 38+ Resource Timing Stable D J F M A M J J A S O N 10+ 2013 2014 X X Commits on ed. draft Timing hooks Limited Started344

Performance ? ? ? 30+ Rec Finished Finished Timeline ? 11+ ?

Web Performance Growing Well started345

X 37+ 24+ 38+ User Timing Rec Finished Finished

X 10+ X

Last updated April None Experimental 2014 Resource X X X X Retired Abandoned Priorities346 D J F M A M J J A S O N 11+ 2013 2014 X X Commits on ed. draft Network prioritization Last updated None None? November 2014

WD ? ? ? ? Resource Hints347 Early draft D J F M A M J J A S O N 2013 2014 ? ? ? Commits on ed. draft

343. http://w3c-test.org/navigation-timing/ 344. http://w3c-test.org/performance-timeline/ 345. http://w3c-test.org/user-timing/

53/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 13. PERFORMANCE & OPTIMIZATION

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated April None Very limited 2013

Efficient Script Editors X X X X Priority handling Early draft Yielding D J F M A M J J A S O N 10+ 2013 2014 X X Commits on ed. draft

Well deployed Good coverage348

Page Visibility 7.0+ 37+ 12.1+ 38+ Page Visibility Rec Finished Finished detection 10+ 10+ 32+

Last updated Well started Well deployed September 2014 Timing control for Animation 6.0+ 37+ 24+ 38+ script-based CR Stable optimization D J F M A M J J A S O N animations 10+ 10+ 32+ 2013 2014 Commits on ed. draft

Well started351

Last updated May Well deployed 2014 5.0+ 2.1+ 11+ 38+ Threading Web Workers349 Web Applications CR Stable D J F M A M J J A S O N 10+ 10+ 32+ 2013 2014 350 Commits on ed. draft

346. http://www.w3.org/TR/resource-priorities/ 347. http://www.w3.org/TR/resource-hints/ 348. http://w3c-test.org/page-visibility/ 349. http://www.w3.org/TR/workers/ 350. http://docs.webplatform.org/wiki/tutorials/workers_basics 351. http://w3c-test.org/workers/

54/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 13. PERFORMANCE & OPTIMIZATION

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated Good coverage Limited November 2014 LCWD X X X 38+ Battery Status Battery Status API Device APIs Stable D J F M A M J J A S O N 32+ 2013 2014 X X Commits on ed. draft

N/A Mobile Web Optimization Best Mobile Web Best Application Best Rec Finished N/A N/A Practices Practices Practices 352

352. http://www.w3devcampus.com/mobile-web-and-application-best-practices-training/

55/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 14. PRIVACY & SECURITY

14. Privacy & Security

Mobile devices follow their users everywhere, and hold some of their most private or confidential data (contacts, pictures, calendar, etc.) As a result, it is critical for users to be able to rely on their phones to keep that data safe from attackers.

W3C specifications are reviewed for their security and privacy impact as part of their progress through the Recommendation track; the Privacy Interest Group353 and the Web Security Interest Group354 in particular are coordinating reviews on their respective fields.

Many sensitive APIs are gated by a request for user consent; while these requests give control to the user, they can be sometimes hard to integrate in the overall user experience without visibility on which permission has been granted or denied. The Permissions API355 aims at fixing this.

But beyond these cross-technology considerations, a number of ongoing work items address needs for additional protection.

The first line of defense for users, and the unit of isolation for Web apps is the same-origin policy that roughly limits what a Web application can access to content and data hosted on the same origin, i.e. the combination of URL scheme, domain name and port.

For legacy reasons, this policy is not as stringent on some parts of the Web platform, exposing users to greater attack surface via cross-site scripting or cross-site request forgery. To enable Web application authors to reduce the attack surface beyond what legacy requires, the Content Security Policy356 offers hooks that severely limits damages that an attacker could hope to achieve.

To further strengthen the integrity of their applications, Web developers can make use of the proposed Subresource integrity357 mechanism, that makes it possible to block man-in-the-middle attacks or compromised third-parties providers.

In applications that aggregate content from multiple (possibly untrusted) sources, the HTML5 iframe sandbox358 makes it possible to restrict what kind of interactions third-party embedded content can make use of.

As described earlier, the Web Cryptography API provides the necessary tools to encrypt data for storage and transmission from within Web applications, with access pre-provisioned keys via the WebCrypto Key Discovery API.

For users that wish to indicate their preferences not to be tracked across Web applications and sites, the Tracking Preference Expression (also known as Do No Track)359 enables browsers to communicate explicitly their wish to content providers, and to determine whether a given content provider asserts fulfilling that wish.

To facilitate the authentication of users to on-line services, early work has started on identifying opportunities for browsers to help manage credentials360 and on-line authorization361

353. http://www.w3.org/Privacy/ 354. http://www.w3.org/Security/wiki/IG 355. https://w3c.github.io/permissions/ 356. http://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-1.0-specification.html 357. http://w3c.github.io/webappsec/specs/subresourceintegrity/ 358. http://www.w3.org/html/wg/drafts/html/CR/browsers.html#sandboxing 359. http://www.w3.org/2011/tracking-protection/drafts/tracking-dnt.html 360. http://lists.w3.org/Archives/Public/public-webapps/2014JulSep/0141.html 361. http://lists.w3.org/Archives/Public/public-webapps/2014JulSep/0214.html

56/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 14. PRIVACY & SECURITY

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated N/A None November 2014 Proposed addition Permission X X X X Permissions API to Web Application N/A Draft proposal management Security D J F M A M J J A S O N 2013 2014 X X X Commits on ed. draft

Well started364 Last updated June Well-deployed 2013 Content Security 6.0+ 37+ 24+ 38+ CR Stable Policy 1.0362 D J F M A M J J A S O N 10+ 10+ 32+ 2013 2014 Commits on ed. draft Web Application 363 Security Last updated None November 2014 None

Subresource WD X X X X Just started Strengthened Integrity365 security D J F M A M J J A S O N X X X 2013 2014 Commits on ed. draft

Last updated None367 October 2014 Widely deployed

Sandboxed iframe 4.2+ 2.2+ 24+ 38+ HTML Rec Stable in HTML5366 10+ 10+ 32+

D J F M A M J J A S O N 2013 2014 Commits on ed. draft

362. http://www.w3.org/TR/CSP/ 363. http://docs.webplatform.org/wiki/tutorials/content-security-policy 364. http://w3c-test.org/submissions/113/csp/ 365. http://www.w3.org/TR/SRI/ 366. http://www.w3.org/TR/html5/browsers.html#sandboxing 367. http://w3c-test.org/html/browsers/sandboxing/

57/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE 14. PRIVACY & SECURITY

Latest editors Current Feature Specification Working Group Maturity Stability Developers doc Test suite draft implementations

Last updated None November 2014 Well deployed

Web Cryptography LCWD 8+ 37+ 24+ 38+ Stabilizing API X 11+ 19+ D J F M A M J J A S O N 2013 2014 Encrypted storage Web Cryptography Commits on ed. draft

Last updated May None None 2014

WebCrypto Key WD X X X X Early work Discovery D J F M A M J J A S O N 2013 2014 X X X Commits on ed. draft

Good deployment None Tracking Preference Tracking Tracking LCWD Last updated 5+ ? ? 23+ Expression 369 Stabilizing protection 368 Protection September 2014 (DNT) ? 9+ 6+

368. http://www.w3.org/TR/tracking-dnt/ 369. http://www.w3.org/2011/tracking-protection/

58/59 STANDARDS FOR WEB APPLICATIONS ON MOBILE ACKNOWLEDGMENTS

Acknowledgments

Thanks to Art Barstow, Anssi Kostiainen, Jo Rabin, J. Manrique López, Mounir Lamouri, Marcos Caceres, François Daoust and Ronan Cremin for their contributions to this document.

This document is produced through the HTML5Apps project370, funded by the European Union through the Seventh Framework Programme (FP7/2013-2015) under grant agreement n°611327 - HTML5 Apps.

Spanish translation is produced through the Expert advice on mobility and visualization project, funded by Cenatic371.

370. http://html5apps-project.eu/ 371. http://www.cenatic.es/

59/59