Android and iOS support HTML5 in new versions

Android and iOS support HTML5 in new versions

The two largest mobile operating systems, Android and iOS, are likely to prepare to add support for HTML5 in their latest versions. Google stripped WebView from the core components of Android and turned it into an upgradeable component. At the same time, Apple replaced the previous UIWebView with WKWebView, which has advantages in performance, stability and functionality in hybrid applications.

Hybrid apps are similar to native apps. They are also installed from Google Play or the App Store, but they are developed using technologies such as HTML, CCS, and JavaScript. A browser engine is used to parse, run, and display these apps, and each operating system exports an API for the engine to interact with it. In Android, this engine is WebView, and in iOS it is called WKWebView. Developers can embed web content in their apps and access resources that regular mobile websites cannot access, such as the camera, file system, and NFC.

WebView has always been a core component of Android, and it was previously updated only when the operating system was upgraded. Since the release speed of Android versions is generally slow and the pace of each manufacturer is different, not all mobile phones and tablets can be upgraded to the latest version at the same time (if they really need to be upgraded), which results in users being unable to use the latest features or being threatened by security vulnerabilities. After the release of KitKat, the Chrome development team acknowledged this problem and planned to turn the browser engine into a regularly updated component.

Starting with Android Lollipop, there is a new feature called Upgradable WebView. As the name implies, this WebView can now be updated from Google Play as a regular app. This not only ensures that important security updates can be deployed to devices in a timely manner, but also enables new features and APIs to be pushed to developers of applications that rely on WebView in a timely manner.

Apple is also trying to support more HTML5 features in iOS 8. One notable thing is to use WKWebView to replace the old engine UIWebView. In previous iOS versions, hybrid apps could not reach the JavaScript performance level of native Safari apps because Apple restricted the use of Safari's JavaScript engine Nitro, making UIWebView slow.

Now with the WKWebView API, hybrid apps running on iOS 8 can take advantage of the same optimizations as the Safari browser. Benchmarks show that JavaScript in these apps is 4.5 times faster than the old UIWebView API. But the new API has a bug that can break some hybrid apps, starting with beta 4.

In addition to this major change, iOS 8 also supports the following HTML5 features:

WebGL

IndexedDB

HTML templates

Navigation/high-precision timing

CCS shape

SVG fragment identifier

You can check out this article for details on the specific improvements to WKWebView.

Link to this article: http://www.cocoachina.com/webapp/20141121/10277.html

<<:  Android Studio 1.0 RC released

>>:  Longer term trends of the top 10 programming languages ​​ranking (1989-2014)

Recommend

Trivia | He Shen actually has the same surname as Zhen Huan, not He!

He Shen's surname was not He, but Niu Hulu. T...

Zhang Ziyi and Gong Li's movie "Memoirs of a Geisha" HD Chinese subtitles

Based on the novel of the same name by American w...

To give giraffes “manicures”, you have to start when they are babies!

In the previous sharing, we discussed in detail t...

"The Royal Anglican Knights" HD Japanese plug-in Chinese subtitles

Chinese name: Royal Anglican Knights Original tit...

How much does it cost to customize a jewelry mini program in Hezhou?

The launch of mini programs has brought convenien...

Google releases Chrome 92 software update for iOS and Android mobile platforms

This week, Google released a new version of the G...

Tencent practical case! Review of QQ dream expression design

The deep integration of "Internet + charity&...

Xiaohongshu Food Popularity Article Methodology

The article starts with analyzing the hot food ar...