Comparison of HTML5 and Flash

From Infogalactic: the planetary knowledge core
Jump to: navigation, search

HTML5 can be used as an alternative to Adobe Flash.[1] Both include features for playing audio and video within web pages, and integrated vector graphics are possible with both.

"HTML5" in this article sometimes refers not only to the HTML5 specification, which does not itself define ways to do animation and interactivity within web pages,[2] but to HTML5 and related standards like JavaScript or CSS 3. Animation via JavaScript is also possible with HTML 4.

Comparison table

The table below compares the features of the Flash platform, the HTML5 specification and the features implemented in modern web browsers.

HTML5 standard HTML web browser features Adobe Flash/AIR features
Date started Work began in 2003
Working Draft as of 2011[3]
N/A Work began in 1996[4]
Version 1 released in 1997
Desktop operating systems N/A AmigaOS, MorphOS, Microsoft Windows, Apple Mac OS X, Linux Microsoft Windows, Apple Mac OS X,
Linux (PPAPI-only after 11.2),[5][6] Solaris
Mobile operating systems N/A Windows Phone 8+,[7] Android 2.3+,[7] Apple iOS 6+,[7] Symbian Belle+,[7] BlackBerry OS 7+[7] Up to Android 4.0[8] (unofficially for Android 4.1 and above),[9] BlackBerry PlayBook,[10] BlackBerry 10 v10.0 - 10.3.0 (10.3.1 unofficially supported),[11] Windows RT ,[12] iOS 64-bit Support
Video game consoles N/A Xbox 360,[13][14] Sony PlayStation 3,[13][15][16] Nintendo Wii,[13][17][18][19] PlayStation Vita Sony PlayStation 3 (Flash 9 only), Nintendo Wii (Flash Lite only)
Device support N/A Limited access to web camera, microphone, accelerometer, GPS Full access to web camera, microphone, accelerometer, GPS
Market penetration N/A ~96% of internet connected PCs are CSS 2/3 ACID compliant,[20]
~99% support JavaScript 1.5 or above,[21] ~95% of devices support basic SVG[22]
~95% of internet connected PCs[23]
(~83% have Flash Player 11, ~17% have 10 and below),[24]
but 33% of web traffic comes from mobile devices[25]
Vector graphics formats N/A Scalable Vector Graphics (SVG) supported on ~95% of browsers[22] SWF with embedded graphics and AS3SVGRenderer
Bitmap effects Yes ~80%[26] support of Filters in CSS3 (e.g. Glow, Blur, Drop Shadow, Sepia)[27] Yes, applied to text or graphics (e.g. Glow, Drop Shadow, Bevel)[28]
Vector text display Yes Yes Yes, with Saffron Type System
Font support N/A Installed fonts and custom fonts using CSS 3 web fonts Installed fonts and embedded fonts[29]
Text anti-aliasing N/A Yes, implemented in most browsers, for system and custom fonts Yes, in most cases^2
Text tab stops No Only supported inside "pre" tags Yes, with Text Layout Framework
Liquid text layout Yes Yes, via "div" tag and CSS styling No, but text fields can be resized in ActionScript
Tabular data Yes Yes, via "table" tag No, but text fields can be arranged into a grid
Linked text frames^1 As of 2016, two specifications compete: CSS Regions[30] and CSS Overflow[31] With CSS Regions, supported by Safari, IE11 and Edge[32] Yes, with Text Layout Framework[33]
Programming languages Depends JavaScript ActionScript, Pixel Bender
C++ support Cross-compiling C++ code to JavaScript via Emscripten Native code execution with Google Native Client in Google Chrome only Cross-compiling C++ code to run in Flash Player via FlasCC[34] AIR has AIR Native Extensions that allow loading native code, such as compiled c++ code.
Code delivery format Plaintext Plaintext JavaScript with limited obfuscation Compiled bytecode, can be obfuscated
Data formats Depends CSS 3, HTML, XML, JSON[35] JSON, XML, Subset of CSS 1[36]
Data compression No GZIP compression for HTML, JS and CSS files (on supported servers)[37] LZMA or DEFLATE for SWF files
Image formats Depends PNG, JPEG, Animated GIF PNG, JPEG, JPEG-XR, Single-frame GIF[38][39]
Video formats Depends 90+% support of H.264;[40] varying support of WebM and Ogg Theora (see HTML5 video) H.264, Sorenson Spark, and On2 VP6[41]
Streaming video Yes[42] Supported by IE, Edge, Firefox, Chrome, Safari and Opera.[43] Flash Video, H.264 and partial support for MP4
Audio formats Depends 90+% support of MP3,[44] AAC[45] and WAV PCM; varying support of Ogg Vorbis, and WebM Vorbis (see HTML5 audio) MP3, WAV and AAC audio files or embedded sound
Fullscreen support Yes[46] Supported on all major desktop browsers, with warning displayed.[47] Not yet widely supported on mobile Yes, with warning displayed
Encryption DRM Via obfuscation No, all files being plaintext, except for obfuscation No, binary formatted files can be decompiled, which is obfuscation
File system access No Varying support of single file upload, and drag and drop of files onto browser Support for single file upload and generation,[48]
AIR only: full create/read/write access to file system[49]
Bitmap manipulation No ~95% support for HTML5 "canvas" element[50] Yes, via BitmapData class[51]
Binary manipulation Yes Yes, via JavaScript Typed Arrays[52] Yes, via ByteArray class[53]
Large binary data No Via Web Sockets to stream binary or XML data Yes, embedded or streaming binary data[54]
Offline storage Depends Yes, via Web storage or HTTP cookie to store binary, XML or JSON data[55] Yes, via Local Shared Objects to store AMF-formatted data
Metadata Meta tags Can be included in meta tags Extensible Metadata Platform

Notes

  1. ^ Allows text to overflow into other text boxes, useful for desktop publishing.
  2. ^ Static text created via Flash editor is automatically embedded and anti-aliased. Text fields created via ActionScript need fonts to be manually embedded for anti-aliasing to work.

Comparison

Software support

Flash

Web browsers cannot render Flash media themselves, instead it is rendered primarily via the proprietary but freely available Adobe Flash Player. Until 2008, there was no official specification which was allowed to be used to create an alternative player. Alternative players have been developed before 2008, but they support Flash to a lesser degree than the official one.[56]

The latest version of the Adobe Flash Player runs on Microsoft Windows, Apple OS X, RIM, QNX and Google TV.

Earlier versions run on Android 2.2-4.0.x (Flash has been released for 4.0, but Adobe has announced that they will discontinue support for Android 4.1 and higher.[57]) (Flash 11.2), GNU/Linux (Flash 11.2, except for Pepper Flash which is maintained and distributed by Google, not Adobe), PlayStation 3 (Flash 9), PSP (Flash 6). Adobe Flash Lite runs on Wii, Symbian, Maemo Linux, Windows Mobile, and Chumby.

Apple does not allow Flash to run on iOS, the operating system which runs on iPad, iPhone, iPod Touch and Apple TV. Apple stated that it has no plans to do so.[58]

In February 2012, Adobe announced it would discontinue development of Flash Player on Linux for all browsers except Google Chrome by dropping support for NPAPI and using only Chrome’s PPAPI.[5][6]

HTML 5

All web browsers support HTML and other Web standards to various degree. Adobe released a tool that converts Flash to HTML5,[59] and in June 2011, Google released an experimental tool that does the same.[60][61]

As of December 2013, versions of browsers such as Chrome, Firefox, Internet Explorer, Opera, and Safari implement HTML5 to a considerable degree. However, some portions of the HTML5 specification were still being implemented by browser makers.

As of January 2015, YouTube will default to HTML5 players to better support more devices.[62]

Vendor neutrality

Until 2008, the use of Flash was covered by restrictive licenses. The conditions prohibited use of the specification to develop any software (including players) which could render or read (and thus convert) SWF files, and required the output SWF files to be compatible with Adobe’s players.[63]

In 2008, restrictions on use of the SWF and FLV/F4V specifications were dropped, and some specifications were released.[64] However, the “SWF File Format Specification Version 10” allegedly did not contain all the needed information, did not contain much information that hasn’t been previously known by the community,[65] and itself could not be copied, printed out in more than one copy, distributed, resold or translated, without written approval of Adobe Systems Incorporated.[66]

Flash is not an open standard. It is controlled by one firm, Adobe Systems. In contrast, HTML5 is controlled mostly by a committee, the Web Hypertext Application Technology Working Group (WHATWG) of three companies: Opera Software, the Mozilla Foundation, and Apple.[58]

Various people have praised Flash over the years for rendering consistently across platforms. Constructing sites in Flash is a way to prevent code forking, whereby different versions of a site are created for different browsers.[67][68]

Speaking at 'Adobe Max' in 2011, Itai Asseo likewise said that, unlike HTML 5, Flash offers a way to develop applications that work across platforms. HTML 5, he said, is currently implemented differently (if at all) by different browsers. Although the Flash browser plugin is not supported on the Apple iPhone OS, Flash applications can be exported to Adobe AIR, which runs on that operating system as a native application. In the same talk, Mr. Asseo lamented the return to another browser war (as seen in the late 1990s). If Flash falls out of favor, he said, web developers will either have to develop many different versions of their web sites and native applications to take into account different HTML 5 implementations, deny access to browsers that do not support their version of HTML, or dramatically reduce the functionality of their sites in order to deliver content to the least-advanced browser.[69]

Authoring

Constructing Flash websites using Adobe tools is relatively easier than with integrated development environments for CSS, HTML, and JavaScript;[70] however, many of Adobe's tools are expensive and proprietary software.[70]

Tools for HTML5 are just starting to come to market; in the meantime, Adobe has released a first version of a Flash-to-HTML5 conversion tool for existing content[71] and are working on creating new tooling for HTML5 as well, like Adobe Edge.[72]

Because HTML5 is an open format, tools like those for Flash can be built for it, too. Applications like Hype[73] and Adobe Edge are already on the market.

Performance

<templatestyles src="Module:Hatnote/styles.css"></templatestyles>

Some users, more so those on OS X and Linux, have complained about the relatively high CPU usage of Flash for video playback.[74][unreliable source?] This was partially because the Flash plugin did not use the GPU to render video. Adobe has responded to some of those criticisms in the 10.1 and 10.2 releases of the Flash plugin by offloading H.264 video decoding to dedicated hardware and by introducing a new video API called Stage Video.[75][unreliable source?] In addition, the use of the newer ActionScript 3.0 inside Flash movies instead of the older ActionScript 2.0 improves code execution speed by a factor of around 10. But older websites that use ActionScript 2.0 will not benefit from this.[76] The software routines written by developers can also affect the performance of applications built in Flash, reasons that would affect HTML5 animations as well.[77]

An HTML vs Flash comparison in 2010 listed non-Flash technologies as being slower than Flash when used for non-video animations,[78] but in January 2012 some of them were faster.[79]

Features

Flash has the ability to specify measurements in sub-pixel increments. This can result in a crisper and generally more pleasant appearance of Flash web sites. When confronted with CSS and HTML measurements on a sub-pixel scale, web browsers will round either up or down, depending on the browser, which leads to inconsistency and unreliability in the display of those pages.[70]

Flash offers webcam support, while HTML and related technologies did not until recently.[clarification needed]

There are, however, people working on adding "device support" (device API) to the HTML5 specification, which would allow for videoconferencing, access to webcams, microphones, USB-thumbdrives and other USB- or serial devices.[80][81]

DRM

Flash includes DRM support.

HTML5 does not include any digital rights management functionality. Implementations can support DRM outside the scope of HTML, for example in codecs.[82] The proposal to add DRM features to HTML5 itself has been criticised by those who consider openness and vendor-neutrality (both server- and client-side) one of the most important properties of HTML, because DRM is incompatible with free software,[83][84] and in the proposed form potentially not more vendor-neutral than proprietary plug-ins like Flash.[85][86]

Accessibility

Both Flash and HTML text can be read by screen readers. However, special care must be taken to ensure Flash movies are read correctly. For example, if a Flash movie is set to repeat indefinitely, this can cause a screen reader to repeat the content endlessly. Selecting the "Make object accessible" check box in Adobe Flash Professional will create a text-only version of the object for screen readers. It will also hide any motion from the screen reader.[87] Since Flash content is usually placed on a single webpage, it appears as a single entry in search engine result pages, unless techniques like deep linking are used with libraries like SWFAddress to provide multiple links within Flash websites and web applications. User interface widgets in Flash objects don't always behave like their host native counterparts. Keyboard, mouse and other accessibility shortcuts may not work unless the webpage developer explicitly adds support for it.

Search engines

Both Flash content and HTML content can be indexed by Google, Yahoo!, and Bing, although bi-directional text (e.g. Arabic, Hebrew) is not supported by Google.[88][89] Yahoo! added support for indexing Flash sites in 2008, although Google had been able to index them for several years before that. Bing added support for Flash sites in 2010.

iOS devices

<templatestyles src="Module:Hatnote/styles.css"></templatestyles>

Apple has been promoting HTML5 as an alternative to Flash for video and other content on the iOS, citing performance reasons for not allowing Adobe Flash Player to be installed on iOS devices, including the iPhone, iPod touch and iPad.[58][90][90] Flash applications can be packaged as native iOS applications via the Adobe Integrated Runtime and the iOS Packager.[91]

See also

References

  1. Lua error in package.lua at line 80: module 'strict' not found.
  2. Lua error in package.lua at line 80: module 'strict' not found.
  3. Lua error in package.lua at line 80: module 'strict' not found.
  4. Lua error in package.lua at line 80: module 'strict' not found.
  5. 5.0 5.1 Lua error in package.lua at line 80: module 'strict' not found.
  6. 6.0 6.1 Lua error in package.lua at line 80: module 'strict' not found.
  7. 7.0 7.1 7.2 7.3 7.4 Mobile HTML5 Support, TheHTML5Test.com
  8. Lua error in package.lua at line 80: module 'strict' not found.
  9. Lua error in package.lua at line 80: module 'strict' not found.
  10. Lua error in package.lua at line 80: module 'strict' not found.
  11. Lua error in package.lua at line 80: module 'strict' not found.
  12. https://forums.adobe.com/thread/1679699
  13. 13.0 13.1 13.2 Lua error in package.lua at line 80: module 'strict' not found.
  14. Lua error in package.lua at line 80: module 'strict' not found.
  15. Lua error in package.lua at line 80: module 'strict' not found.
  16. http://functionsource.com/post/netflix-feature
  17. Lua error in package.lua at line 80: module 'strict' not found.
  18. Lua error in package.lua at line 80: module 'strict' not found.
  19. Lua error in package.lua at line 80: module 'strict' not found.
  20. Lua error in package.lua at line 80: module 'strict' not found.
  21. Lua error in package.lua at line 80: module 'strict' not found.
  22. 22.0 22.1 http://caniuse.com/svg
  23. Lua error in package.lua at line 80: module 'strict' not found.
  24. Lua error in package.lua at line 80: module 'strict' not found.
  25. Lua error in package.lua at line 80: module 'strict' not found.
  26. http://caniuse.com/css-filters
  27. Lua error in package.lua at line 80: module 'strict' not found.
  28. Lua error in package.lua at line 80: module 'strict' not found.
  29. Lua error in package.lua at line 80: module 'strict' not found.
  30. Lua error in package.lua at line 80: module 'strict' not found.
  31. Lua error in package.lua at line 80: module 'strict' not found.
  32. Lua error in package.lua at line 80: module 'strict' not found.
  33. Lua error in package.lua at line 80: module 'strict' not found.
  34. Lua error in package.lua at line 80: module 'strict' not found.
  35. Lua error in package.lua at line 80: module 'strict' not found.
  36. Lua error in package.lua at line 80: module 'strict' not found.
  37. See also List of HTTP header fields#transfer-encoding-response-header.
  38. Lua error in package.lua at line 80: module 'strict' not found.
  39. Lua error in package.lua at line 80: module 'strict' not found.
  40. Lua error in package.lua at line 80: module 'strict' not found.
  41. Lua error in package.lua at line 80: module 'strict' not found.
  42. Lua error in package.lua at line 80: module 'strict' not found.
  43. Lua error in package.lua at line 80: module 'strict' not found.
  44. Lua error in package.lua at line 80: module 'strict' not found.
  45. Lua error in package.lua at line 80: module 'strict' not found.
  46. Lua error in package.lua at line 80: module 'strict' not found.
  47. Lua error in package.lua at line 80: module 'strict' not found.
  48. Lua error in package.lua at line 80: module 'strict' not found.
  49. Lua error in package.lua at line 80: module 'strict' not found.
  50. http://caniuse.com/canvas
  51. Lua error in package.lua at line 80: module 'strict' not found.
  52. Lua error in package.lua at line 80: module 'strict' not found.
  53. Lua error in package.lua at line 80: module 'strict' not found.
  54. Lua error in package.lua at line 80: module 'strict' not found.
  55. Lua error in package.lua at line 80: module 'strict' not found.
  56. Lua error in package.lua at line 80: module 'strict' not found.
  57. Lua error in package.lua at line 80: module 'strict' not found.
  58. 58.0 58.1 58.2 Lua error in package.lua at line 80: module 'strict' not found.
  59. Lua error in package.lua at line 80: module 'strict' not found.
  60. Lua error in package.lua at line 80: module 'strict' not found.
  61. Lua error in package.lua at line 80: module 'strict' not found.
  62. Lua error in package.lua at line 80: module 'strict' not found.
  63. Lua error in package.lua at line 80: module 'strict' not found.
  64. Lua error in package.lua at line 80: module 'strict' not found.
  65. Lua error in package.lua at line 80: module 'strict' not found.
  66. Lua error in package.lua at line 80: module 'strict' not found.
  67. Lua error in package.lua at line 80: module 'strict' not found.
  68. Lua error in package.lua at line 80: module 'strict' not found.
  69. Lua error in package.lua at line 80: module 'strict' not found.
  70. 70.0 70.1 70.2 Lua error in package.lua at line 80: module 'strict' not found.
  71. Lua error in package.lua at line 80: module 'strict' not found.
  72. Lua error in package.lua at line 80: module 'strict' not found.
  73. Lua error in package.lua at line 80: module 'strict' not found.
  74. "Flash – CPU Usage – FPS – Frame Rate." Online posting. 10 December 2008. Reader discussions, Adobe Support Forums. 10 December 2010
  75. Lua error in package.lua at line 80: module 'strict' not found.
  76. Lua error in package.lua at line 80: module 'strict' not found.
  77. Lua error in package.lua at line 80: module 'strict' not found.
  78. Lua error in package.lua at line 80: module 'strict' not found.
  79. Lua error in package.lua at line 80: module 'strict' not found.
  80. Lua error in package.lua at line 80: module 'strict' not found.
  81. Lua error in package.lua at line 80: module 'strict' not found.
  82. Lua error in package.lua at line 80: module 'strict' not found.
  83. Lua error in package.lua at line 80: module 'strict' not found.
  84. Lua error in package.lua at line 80: module 'strict' not found.
  85. Lua error in package.lua at line 80: module 'strict' not found.
  86. Lua error in package.lua at line 80: module 'strict' not found.
  87. Lua error in package.lua at line 80: module 'strict' not found.
  88. Lua error in package.lua at line 80: module 'strict' not found.
  89. Lua error in package.lua at line 80: module 'strict' not found.
  90. 90.0 90.1 Lua error in package.lua at line 80: module 'strict' not found.
  91. Lua error in package.lua at line 80: module 'strict' not found.

External links