最近尝试将做的一个Android项目web化,而其中的一个方案,就是做成html5的。于是做了一些Demo,也做了一些简单的研究。其中一个比较重要的问题,就是HTML5在Android和IOS的兼容性如何。

找到下面的表格,很好的解答了我的问题。

与看到这篇博文的好友一起分享。


FeatureSafari on iOSAndroid BrowserBlackBerry BrowserNokia BrowserInternet ExplorerOperaFirefoxwebOS Browser
Version testediPhone, iPadPhones 
(1-2.3, 4.0)
Tablets (3.0+)PhonesTabletMeego - Nokia N9SymbianWindows PhoneMobileMiniAndroid 
Minimum version tested3.21.53.05.01.01.2^3911561.4

Application Cache

W3C API

Offline package installation.

truetrue
2.1+
truetrue
6.0+
truetrue  true truetrue

Web storage

W3C API

Persistent and session storage.

truetrue
2.0+
truetrue
6.0+
truetrue truetrue truetrue

Web SQL storage

W3C API (no active)

Persistent SQLite storage.

truetrue
2.0+
truetrue
6.0+
truetrue  true  true

Geolocation

W3C API

Geolocation & tracking using GPS, cells or Wi-Fi.

truetrue
2.0+
truetrue
6.0+
truetrue truetrue truetrue

Multimedia

W3C API

Video & Audio Players

truetrue
2.3+
truetrue
7.0+
truetrue truetrue truetrue

Server-Sent Events

W3C API

EventSource pattern to mantain the connection to the server open

true
4.1+
    true  true true 

Web Sockets

W3C API

Newbidireccional protocol over HTTP

true
4.2+
  true
6.1+
true   true true
7+
 
FeatureSafari on iOSAndroid BrowserBlackBerry BrowserNokia BrowserInternet ExplorerOperaFirefoxwebOS Browser
Version testediPhone, iPadPhones (1.0-2.3)Tablets (3.0+)PhonesTabletMeego - Nokia N9SymbianWindows PhoneMobileMiniAndroid 

Web Workers

W3C API

Threading and background process communications

true
5.0+
  true
6.0+
truetrue  true true 

Canvas API

W3C API

2D Drawing API

truetruetruetruetruetruetrue
Anna+
truetruetruetruetrue

SVG

W3C Working Group

Scalable Vector Graphics

truetrue
4.0+
truetruetruetruetruetruetruetruetrue 

Motion Sensors

W3C Standard

Accelerometer, Gyroscope, Magnetometer

true
4.2
true
4.0+
true  true    true
moz (custom)
 

HTML5 Form Virtual Keyboards

W3C Standard

Text Inputs with different keyboards

true  truetruetruetrue
Anna+
truetrue true 

HTML5 Form New Controls

W3C API

At least: Date, Time, Month, Range

true
5.0+
 true     true true 

Touch Events

W3C API

touchstart, touchend, touchmove, touchcancel

truetrue
2.1+
truetrue
6.1+
truetrue  true
(Android)
 true 
FeatureSafari on iOSAndroid BrowserBlackBerry BrowserNokia BrowserInternet ExplorerOperaFirefoxwebOS Browser
Version testediPhone, iPadPhones (1.0-2.3)Tablets (3.0+)PhonesTabletMeego - Nokia N9SymbianWindows PhoneMobileMiniAndroid 

CSS 3 Basic

W3C Standard

opacity, backgrounds, text effects, rounded corners

truetruetruetrue
6.0
truetruetrue
Anna+
truetruetrue
partial
truetrue

CSS 3 Transforms 2D

W3C Standard

rotate, translate, scale, skew, matrix

truetrue
2.0+
truetrue
6.0
truetruetrue
Anna+
truetruetrue
partial
truetrue

CSS 3 Transforms 3D

W3C Standard

scale3d, translate3d. Perspective, Backface

truetrue
4.0+
true truetrue      

CSS 3 Transitions

W3C Standard

Animations between two states

truetrue
2.0+
truetrue
6.0
truetruetrue
Anna+
 true truetrue

CSS 3 Animations

W3C Standard

Animations with keyframes

truetrue
2.0+
truetrue
6.0
truetruetrue
Anna+
   truetrue

Viewport definition

W3C API

Meta tag support.

truetrue
supports target-densityDpi
truetruetruetruetrue
Anna+
truetrue
supports css & meta
 truetrue

Position: fixed support

W3C Standard

Ability to mantain an element fixed in the viewport while scrolling / zooming

true
5.0+
true
2.2+ & non scalable viewport
true
3.1+
true
7.0+
truetrue      

Remote Debugger

Ability to attach a remote debugger, such as Web Inspector

true
weinre (inspector)
true
weinre (inspector)
trueweinre (inspector)true
7.0+ 
true   true
DragonFly
  true
weinre (nspector)
FeatureSafari on iOSAndroid BrowserBlackBerry BrowserNokia BrowserInternet ExplorerOperaFirefoxwebOS Browser
Version testediPhone, iPadPhones (1.0-2.3)Tablets (3.0+)PhonesTabletMeego - Nokia N9SymbianWindows PhoneMobileMiniAndroid 

WebGL

Khronos Group API

3D Canvas for the web

 true
2.3 only on Sony Xperia
  true
2.0 beta
     true 

XMLHttpRequest 2.0

W3C API

AJAX 2.0: upload files, progress

true
5.0+
true
4.0+
true  true      

Navigation Timing API

W3C API

Performance events for WPO

 true
4.0+
true
4.0+
    true  true
7+
 

Notifications API

W3C API

Background alert notifications

          true
custom code
 

Network Information API

W3C API

Connection Type: 2G, 3G, 4G, WiFi

 true
2.2+
true         

File API

W3C API

Opening local files through input type

 true
4.0+
true         

CORS

W3C API

Cross origin Resource Sharing, for cross domain AJAX request

truetrue
4.0+
true  true      

HTML Media Capture

W3C API

Taking pictures, record video and audio from an input file type

 true
4.0+
true         

IndexedDB

W3C API

Agnostic database system (replacement for Web SQL)