HTML5 in mobile devices
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)(Learn how and when to remove this template message)
In mobile devices, HTML5 is often used for mobile websites and mobile applications on mobile operating systems such as Firefox OS, Sailfish OS, Tizen and Ubuntu Touch.
- 1 Key features for mobile devices
- 2 HTML5 capabilities in top mobile devices
- 3 Hybrid Mobile Apps
- 4 See also
- 5 References
- 6 External links
Key features for mobile devices
The AppCache, Indexed Database API, and Web storage makes it possible for mobile developers to store things locally on the device, so interruptions in connectivity will not affect the ability for someone to get their work done.
Offline support helps browsers cache static pages. They depend more on HTTP response headers sent by web servers to fetch HTML, CSS and multimedia required to render the web page. If everything required to render is cached, then a page loads quickly, but even if one item is not cached then everything slows down dramatically.
To provide offline support, a cache manifest file should be created to specify the offline application's resources—i.e. its pages, images, and other files needed to run offline. Typically, the manifest also contains a comment that is changed when any of the resources change, prompting the browser to refresh the cache.
CACHE MANIFEST # Version 0.1 offline.html /iui/iui.js /iui/iui.css /iui/loading.gif /iui/toolbar.png /iui/whiteButton.png /images/gymnastics.jpg /images/soccer.png /images/gym.jpg /images/soccer.jpg
The "manifest" attribute of the app's "html" element should specify the URL of the manifest file.
Sites can mark off a space on a page using a Canvas element where interactive pictures, charts and graphs, game components, and other imaginations can be drawn directly by programming code and user interaction — no Flash or other plug-ins are required.
Video and audio streaming support
Development is in the very early stages and subject to format disruption, but sites like YouTube and Pandora could one day skip Flash entirely and bring streaming audio and video, with timed playback and further features.
navigator.geolocation.getCurrentPosition(successCallback, errorCallback, options);
Geolocation is an object which is part of Navigator object. It uses the getCurrentPosition() method. Finding location is an asynchronous operation as it requires the user’s permission for access. Hence callback functions for success and failure are required.
HTML5 capabilities in top mobile devices
A Mobile Web Metrics Report demonstrates HTML5 capabilities in mobile devices. The report checked how many HTML5 features are supported by different devices that access the mobile web.
Top 5 supported features
GeolocationAPI, offline web application support, WebStorage, CSS3 Selectors and 2D animations are the top five supported features referred to by the term HTML5 across the top 15 mobile devices in all USA, UK, Germany, Malaysia, Australia markets examined.
Top 5 partially supported features
Misc. Element types and attributes, extended user interaction concept, CSS3 in General, extended form concept, and extended video / audio support are the top five partially supported HTML5 features across the top 15 mobile devices in all USA, UK, Germany, Malaysia, Australia markets examined.
Top 5 not supported features
Microdata, 3D animation rendering, FileReader API, IndexedDB, and local Device support or the WebWorkers feature respectively are the top five HTML5 features not supported across the top 15 mobile devices in all USA, UK, Germany, Malaysia, Australia markets examined.
This report concludes that HTML5 is a welcome addition to the mobile party, but it does not negate device and OS fragmentation.
Hybrid Mobile Apps
Differences from Native Apps and Mobile Web Apps
Pros and Cons of Hybrid Apps
Hybrid mobile apps have their pros and cons. When choosing what type of mobile application to develop it is important to keep these in mind.
- The app's interface and logic can be built and debugged in the web browser using an emulation framework. This could lower development costs depending on the tools required to develop native apps for the target platforms.
- Hybrid mobile apps are more susceptible to user interface lag due to the extra layers of abstraction.
- Only a certain subset of native functionality is available which depends on the framework. All others native functions are accessible by developing Plugins.
- For native apps, the code base requires recompilation and resubmission to the distribution network, whereas it is possible to instantly update a hybrid mobile web app’s codebase.
Hybrid Mobile App Frameworks
|Apache Cordova (previously PhoneGap)||Apache License, v2.0||3.5.0|
|Oracle ADF Mobile Framework||Proprietary||188.8.131.52||Java JDK 1.4|
|Protocol (Adromil Bogus iFrame)||Proprietary||3.0.9||Bogus API 2.4|
- "» HTML5 from a Mobile Perspective Cloud Four Blog". Cloudfour.com. 2009-07-22. Retrieved 2013-11-13.
- Michael Galpin. "Creating mobile Web applications with HTML 5, Part 3: Make mobile Web applications work offline with HTML 5". Ibm.com. Retrieved 2013-11-13.
- "» 8 Tips For Creating a Mobile Friendly App". TaxSmart Technologies.
- "Geolocation". Dive Into HTML5. Retrieved 2013-11-13.
- "» Native App Development Vs. HTML5 – Which is better?". TaxSmart Technologies.
- What is a Hybrid Mobile App?
- Native, HTML5, or Hybrid
- Native vs HTML5 vs Hybrid