Comparison of HTML5 and Flash

HTML5 can be used as an alternative to Adobe Flash.[1] Both include features for playing audio and video within web pages, It can also be used to play some basic HTML5 browser games 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, Apple macOS, Linux, Microsoft Windows Apple macOS, Linux, Microsoft Windows
Mobile operating systems N/A Android 2.3+,[5] Apple iOS 6+,[5] Symbian Belle+,[5] BlackBerry OS 7+,[5] Windows Phone 8+,[5] Up to Android 4.0[6] (unofficially for Android 4.1 and above),[7] BlackBerry PlayBook,[8] BlackBerry 10 v10.0 - 10.3.0 (10.3.1 unofficially supported),[9] Windows RT ,[10] iOS 64-bit Support
Video game consoles N/A Sony PlayStation 3,[11][12][13] Xbox 360,[11][14] Nintendo Wii,[11][15][16][17] 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,[18]
~99% support JavaScript 1.5 or above,[19] ~97% of devices support basic SVG[20]
~95% of internet connected PCs[21]
(~83% have Flash Player 11, ~17% have 10 and below),[22]
but >50% of web traffic comes from mobile devices[23]
Vector graphics formats N/A Scalable Vector Graphics (SVG) supported on ~97% of browsers[20] SWF with embedded graphics and AS3SVGRenderer
Bitmap effects Yes ~87%[24] support of Filters in CSS3 (e.g. Glow, Blur, Drop Shadow, Sepia)[25] Yes, applied to text or graphics (e.g. Glow, Drop Shadow, Bevel)[26]
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[27]
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[28] and CSS Overflow[29] With CSS Regions, supported by Safari, IE11 and Edge[30] Yes, with Text Layout Framework[31]
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, also supported with WebAssembly (experimental) Cross-compiling C++ code to run in Flash Player via FlasCC[32] 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[33] JSON, XML, Subset of CSS 1[34]
Data compression No GZIP compression for HTML, JS and CSS files[35] LZMA or DEFLATE for SWF files
Image formats Depends PNG, JPEG, Animated GIF PNG, JPEG, JPEG-XR, Single-frame GIF[36][37]
Video formats Depends 90+% support of H.264;[38] varying support of WebM and Ogg Theora (see HTML5 video) H.264, Sorenson Spark, and On2 VP6[39]
Streaming video Yes[40] Supported by IE, Edge, Firefox, Chrome, Safari and Opera.[41] Flash Video, H.264 and partial support for MP4
Audio formats Depends ~94% support of MP3,[42] AAC[43] 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[44] Supported on all major desktop browsers, with warning displayed.[45] 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,[46]
AIR only: full create/read/write access to file system[47]
Bitmap manipulation No ~95% support for HTML5 "canvas" element[48] Yes, via BitmapData class[49]
Binary manipulation Yes Yes, via JavaScript Typed Arrays[50] Yes, via ByteArray class[51]
Large binary data No Via Web Sockets to stream binary or XML data Yes, embedded or streaming binary data[52]
Offline storage Depends Yes, via Web storage or HTTP cookie to store binary, XML or JSON data[53] 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, Flash is primarily rendered via the proprietary, but freely available, Adobe Flash Player. Until 2008, there was no official specification by which to create an alternative player. Alternative players have been developed before 2008, but they support Flash to a lesser degree than the official one.[54]

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

Earlier versions run on Android 2.2-4.0.x (Flash has been released for 4.0, but Adobe announced that they will discontinue support for Android 4.1 and higher.[55]) (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.[56]

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.[57][58] In August 2016, Adobe announced that, beginning with version 24, it would resume offering of Flash Player for Linux for other browsers.[59]

HTML5

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

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 defaults to HTML5 players to better support more devices.[63]

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.[64]

In 2008, restrictions on use of the SWF and FLV/F4V specifications were dropped, and some specifications were released.[65] 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,[66] and itself could not be copied, printed out in more than one copy, distributed, resold or translated, without written approval of Adobe Systems Incorporated.[67]

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).[56]

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.[68][69]

Speaking at 'Adobe Max' in 2011, Itai Asseo likewise said that, unlike HTML5, Flash offers a way to develop applications that work across platforms. HTML5, 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 HTML5 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.[70]

Authoring

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

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[72] and are working on creating new tooling for HTML5 as well, like Adobe Edge.[73]

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

Performance

Flash has a better performance than HTML, as a comparison of Flash with HTML in 2010 listed Flash as being faster than the other technologies, when used for non-video animations, although they are catching up.[75][76]

Some users, more so those on macOS and Linux, have complained about the relatively high CPU usage of Flash for video playback.[77] 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.[78] 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.[79] The software routines written by developers can also affect the performance of applications built in Flash, reasons that would affect HTML5 animations as well.[80]

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.[71]

Flash offers webcam support, while HTML and related technologies did not until recently.

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.[81][82]

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.[83] 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,[84][85] and in the proposed form potentially not more vendor-neutral than proprietary plug-ins like Flash.[86][87]

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.[88] 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.[89][90] 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

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.[56][91][91] Flash applications can be packaged as native iOS applications via the Adobe Integrated Runtime and the iOS Packager.[92]

See also

References

  1. Bilton, Nick (June 30, 2010). "Amazon to Introduce Web-Based Book Previews". Bits. The New York Times. Retrieved December 26, 2010.
  2. James Williamson (August 23, 2010). What HTML5 is (and what it isn't). HTML5 First Look (Online video). Lynda.com.
  3. "HTML Current Status". World Wide Web Consortium.
  4. Shankland, Stephen (February 3, 2010). "HTML vs. Flash: Can a turf war be avoided?". CNET News. Retrieved December 26, 2010.
  5. 1 2 3 4 5 Mobile HTML5 Support, TheHTML5Test.com
  6. Ionescu, Daniel. "Flash Player 11.1 Arrives for Android Ice Cream Sandwich". PC World. Retrieved November 16, 2012.
  7. Walton, Zach. "Adobe May Have Dropped Flash Support For Android, But You Don’t Have To". Retrieved November 17, 2012.
  8. "Adobe enables 3D games with Flash Player 11 and AIR 3 - Major advancements for gaming, media and more". Crackberry. Retrieved January 25, 2015.
  9. "BlackBerry Knowledge Base explains the removal of Adobe Flash from OS 10.3.1". Crackberry. Retrieved January 25, 2015.
  10. https://forums.adobe.com/thread/1679699
  11. 1 2 3 "How well does your browser support HTML5?". HTML5test. Retrieved 2014-06-29.
  12. "totalrevue.com". totalrevue.com. Retrieved 2014-06-29.
  13. "Archived copy". Archived from the original on 2013-01-24. Retrieved 2012-11-24.
  14. "Steve Fulton's Blog - Xbox 360 Internet Explorer Plays HTML5 Games...But Not Flash". Gamasutra. 2012-10-23. Retrieved 2014-06-29.
  15. "Wii U's browser is better equipped for HTML5 than Internet Explorer 10 on PC | GamesBeat | Games | by Jeff Grubb". Venturebeat.com. 2012-11-01. Retrieved 2014-06-29.
  16. "Nintendo: HTML5 support for Wii U browser, but no Flash". Neowin. Retrieved 2014-06-29.
  17. "Wii U browser first for HTML5 compliance, powered by Netfront?". Nintendo Nation.net. 2012-11-02. Retrieved 2014-06-29.
  18. "ACID Compliance and CSS Accessibility". Statowl.com. 2014-01-10. Retrieved 2014-06-29.
  19. "JavaScript Version Usage and Market Share". Statowl.com. Retrieved 2014-06-29.
  20. 1 2 http://caniuse.com/svg
  21. "Web Browser Plugin Market Share / Global Usage". Statowl.com. Retrieved 2014-06-29.
  22. "Flash Player Version Market Share and Usage Statistics". Statowl.com. 2014-06-06. Retrieved 2014-06-29.
  23. "Web usage: mobile and tablet overtakes desktop". CTV News. 2016-11-05. Retrieved 2016-11-07.
  24. http://caniuse.com/css-filters
  25. Danilo, Alex (2012-05-25). "Understanding CSS Filter Effects". HTML5 Rocks. Retrieved 2014-06-29.
  26. "BitmapFilter - Adobe ActionScript 3 (AS3 ) API Reference". Help.adobe.com. 2014-05-28. Retrieved 2014-06-29.
  27. Peter deHaan. "Embedding fonts.". Retrieved July 23, 2012.
  28. "CSS Regions". W3C. Retrieved August 24, 2015.
  29. "CSS Overflow". W3C. Retrieved August 24, 2015.
  30. "CSS Regions". Can I Use... Retrieved February 12, 2016.
  31. "Working with Text Layout Framework (TLF) text". Adobe Systems. Retrieved July 22, 2012.
  32. "Game creation software with Flash | Adobe Gaming". Gaming.adobe.com. Retrieved 2014-06-29.
  33. "Browser-native". Caniuse.com. Retrieved 2014-06-29.
  34. "StyleSheet - Adobe ActionScript 3 (AS3 ) API Reference". Help.adobe.com. 2014-05-28. Retrieved 2014-06-29.
  35. "Which browsers can handle Content-Encoding: gzip ?". schroepl.net. 2003-03-11. Retrieved 2017-04-02.
  36. Thibault Imbert. "What's new in Flash Player 11". Retrieved July 23, 2012.
  37. SWF File Format Specification, Version 10 (PDF). Adobe Systems Incorporated. 2008. p. 25.
  38. "Can I use the MPEG-4/H.264 video format?". Caniuse.com. Retrieved 2016-02-12.
  39. "Supported Codecs". Adobe Systems. Retrieved July 29, 2012.
  40. W3C. "Media Source Extensions". Retrieved August 24, 2015.
  41. Can I Use... "Media Source Extensions". Retrieved October 1, 2015.
  42. "Can I use MP3 audio format?". Caniuse.com. Retrieved 2016-02-12.
  43. "Can I use AAC audio file format?". Caniuse.com. Retrieved 2016-02-12.
  44. WHATWG. "Full Screen API Standard". Retrieved August 24, 2015.
  45. Can I Use... "Full Screen API". Retrieved August 24, 2015.
  46. "FileReference - Adobe ActionScript 3 (AS3 ) API Reference". Help.adobe.com. 2014-05-28. Retrieved 2014-06-29.
  47. "File - Adobe ActionScript 3 (AS3 ) API Reference". Help.adobe.com. 2014-05-28. Retrieved 2014-06-29.
  48. http://caniuse.com/canvas
  49. "BitmapData - Adobe ActionScript 3 (AS3 ) API Reference". Help.adobe.com. 2014-05-28. Retrieved 2014-06-29.
  50. Can I Use... "Typed Arrays". Retrieved August 24, 2015.
  51. "ByteArray - Adobe ActionScript 3 (AS3 ) API Reference". Help.adobe.com. 2014-05-28. Retrieved 2014-06-29.
  52. SWF File Format Specification, Version 10 (PDF). Adobe Systems Incorporated. 2008. p. 253.
  53. Can I Use... "localStore". Retrieved August 24, 2015.
  54. "Gnash Reference Manual". Gnu.org. 2008-05-18. Retrieved 2014-06-29.
  55. Svetlik, Joe (November 21, 2011). "Adobe Flash coming for ICS, not Android 5.0". CNET UK.
  56. 1 2 3 Jobs, Steve (April 2010). "Thoughts on Flash". Apple Inc. Retrieved May 1, 2010.
  57. Noyes, Katherine (April 6, 2012). "For Flash on Linux, Chrome Will Be Users' Only Choice | PCWorld Business Center". Pcworld.com. Retrieved April 10, 2012.
  58. "Adobe Releases Last Linux Version of Flash Player – Slashdot". Linux.slashdot.org. Retrieved April 10, 2012.
  59. "Beta News – Flash Player NPAPI for Linux". Adobe AIR and Adobe Flash Player Team Blog. August 31, 2016. Retrieved November 17, 2016.
  60. "Flash to HTML5: Learn more about the CreateJS toolkit". Adobe.com.
  61. "Google Swiffy". Google Labs. Archived from the original on 2011-09-04.
  62. L., Maxime. "Google just announced a SWF to HTML5 converter". Linked In Groups: HTML5 Technologies.
  63. "YouTube will now default to the HTML5 players for better support on more devices". TNW. Retrieved January 28, 2015.
  64. "SWF and FLV File Format Specification License Agreement". Adobe Systems. 2007-06-27. Archived from the original on 2007-12-22. Retrieved 2008-01-05. You may not use the Specification in any way to create or develop a runtime, client, player, executable or other program that reads or renders SWF files.
  65. "Open Screen Project Press Release". Adobe Systems. 2008-05-01. Retrieved 2008-05-01.
  66. "Free Flash community reacts to Adobe Open Screen Project". Archived from the original on 2008-09-28. Retrieved 2008-11-29.
  67. "SWF File Format Specification Version 10" (PDF). Retrieved 2012-11-13.
  68. Ka Wai Cheung and Craig Bryant (2006). Flash Application Design Solutions: The Flash Usability Handbook. Apress. p. 6.
  69. Huddleston, Rob (2010). Flash Catalyst CS5 Bible. Wiley.
  70. Itai Asseo. "The Death of Flash". Retrieved November 19, 2011.
  71. 1 2 3 Wayner, Peter (June 2, 2010). "HTML5 vs. Flash: The case for Flash". InfoWorld. Retrieved January 5, 2011.
  72. "John Nack on Adobe : "Wallaby" Flash-to-HTML5 conversion tool now available". Blogs.adobe.com. 2011-03-07. Retrieved 2012-06-18.
  73. "Adobe previews its Edge HTML5 animation tool". Gizmag.com. 2010-10-26. Retrieved 2012-06-18.
  74. "Hype Features". Tumultco.com. Retrieved 2014-06-29.
  75. ""HTML5" versus Flash: Animation Benchmarking".
  76. "Flash vs HTML5 Performance (Updated January 2012)".
  77. "Flash – CPU Usage – FPS – Frame Rate." Online posting. 10 December 2008. Reader discussions, Adobe Support Forums. 10 December 2010
  78. Dachis, Adam (December 1, 2010). "Adobe Releases Flash 10.2 Beta, Reduces CPU Usage During Video Playback". Lifehacker. Retrieved December 27, 2010.
  79. "ActionScript 3.0 overview". Adobe Systems. 27 Jun 2006.
  80. Skinner, Grant (October 2010). Quick as a Flash. Adobe MAX 2010.
  81. "Video Conferencing with the HTML5 Device Element". Ajaxian. 2010-09-20. Retrieved 2012-06-18.
  82. "HTML Standard". Whatwg.org. Retrieved 2012-06-18.
  83. "FAQs - HTML Wiki". W3.org. 2011-02-22. Retrieved 2012-06-18.
  84. Cory Doctorow (2013-03-12). "What I wish Tim Berners-Lee understood about DRM". Technology blog at guardian.co.uk. Retrieved 2013-03-20.
  85. Glyn Moody (2013-02-13). "BBC Attacks the Open Web, GNU/Linux in Danger". Open Enterprise blog at ComputerworldUK.com. Retrieved 2013-03-20.
  86. Scott Gilbertson (2013-02-12). "DRM for the Web? Say It Ain’t So". Webmonkey. Condé Nast. Retrieved 2013-03-21.
  87. "Tell W3C: We don't want the Hollyweb". Defective by Design. Free Software Foundation. March 2013. Retrieved 2013-03-25.
  88. "Adobe Flash accessibility design guidelines". Adobe Systems. Retrieved May 21, 2011.
  89. "Flash and other rich media files". Retrieved May 21, 2011.
  90. "Google, Yahoo spiders can now crawl through Flash sites". Ars Technica. Retrieved May 21, 2011.
  91. 1 2 Shankland, Stephen (April 29, 2010). "Jobs: Why Apple banned Flash from the iPhone". Deep Tech. CNET. Retrieved November 13, 2011.
  92. "Adobe AIR | Adobe AIR 3 | Deploy applications". Labs.adobe.com. Retrieved 2012-06-18.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.