Check out my latest project: Full Frontal JavaScript Conference

HTML5 vs. Flash

First of all I wanted to make the title of this post "HTML5 and Flash", but I know it's going to bait more readers if I say versus. I should state for the record that for the foreseeable future I think Flash has a valid place on the web, and I don't personally see it as an us and them web.

Stephen Shankland, writer for CNET News got in touch and asked me to comment on an article he was writing, posing me the questions in this post. Unfortunately my reply got to him to late and he had to go to post without my answers, but I thought that it would be worthwhile sharing my views via my own blog instead.

How far is HTML (and SVG and CSS and WebGL and JavaScript) to reproducing what Flash can do today?

HTML, SVG, CSS and JavaScript are very far along to replacing a lot of what I see Flash doing today - but it should be noted my browsing style is general usage, rather than gaming or interactive videos - which Flash is good at.

WebGL is very much at an early stage in it's development, only really (currently) appearing in the nightly builds of Webkit and Firefox, equally I've seen videos from Mozilla putting WebGL on to a Nokia device with no optimisation and it being able to render pretty well.

There's lots of examples of apps and effects that have been achieve using Flash in the first decade of this century, but today we can build these using Open Web technologies. This ranges from the simple image galleries to full fledged word processors. Adobe released Buzzword which relies on Flash, but on the other side we have Google Docs which relies entirely on the Open Web.

Would you like to see Flash replaced by HTML?

I personally don't think HTML will replace Flash. I think HTML5 and the Open Web will replace Flash where Flash has been used as a stopgap. sIFR is used to bring "custom" fonts to the browser, but now we have really good support for native custom fonts via the CSS fonts module, and products like TypeKit and FontDeck are making it easy for web authors to include those custom fonts without the need of Flash.

The native video element will (eventually) allow us to drop using Flash for video. Flash has done an awesome job of pulling the braces up on browsers for the last decade, and we've needed it, but Flash is so much more than just video or font rendering. I think the smart developers aren't won't be worried about native browser functionality making Flash redundant for noddy tasks, no doubt they'll be thankful to not have to build another video player.

As much as I'd like to see Open Web technology do everything, I still think we're a long way off HTML being able to able to natively replace applications such as Aviary and games like Bow Street Runner.

Equally, as I mentioned before SVG is one technology that has come along, and with the help of the svgweb JavaScript library, SVG works in IE. This library of course gets IE to support SVG via Flash. It translate the SVG markup on to a Flash canvas proving that Flash still has a place on the web as a bridging technology as well as it's intended use.

How serious do you think the H.264/Ogg Theora matter is with the HTML5 video codec?

It's hard to say. Personally it doesn't make much difference to me if I have to encode once, twice or three times. Encoding is a background task so I set my converter off when I produce my screencasts and after an arbitrary amount of time I'll have some files to upload - obviously if you have masses of video to encode the disk usage is going to be a possible issue for you.

The problem lies with patents, which is why Firefox and Opera won't implement H.264 - but the politics and patents are for smarter people than me. There's also the fear that we as content producers could be liable for license costs to the patent owners of H.264.

On the other hand, the company that own the patent for H.264 has elected not to collect royalties until 2016 - when they may again choose not to collect royalties. Flash developers have been using H.264 for some time already and there hasn't been any retribution for them, but for now I'll be producing both H.264 and Ogg Theora encoded content.

I'll be watching this topic closely to see how browsers deal with the two codecs.

As HTML etc. gets what Flash has today, do you think Flash will move upstream and remain relevant, become optional, or what?

I think two things will happen. Firstly I do think that Flash will move (or remain in some cases) upstream, and continue to push what's capable within the browser. Gaming is a great example of an arena that Flash excels at. The second thing I think we'll see is Flash developers taking the progressive enhancement approach to applications, relying more on HTML based solutions and enhancing upwards using Flash - Jeffrey Zeldman posted a great article recently suggestion exactly that.

How difficult is it for a Web developer today to use the fragmented Open Web standards vs. the more consistent Flash?

I don't think it's too hard at at all, but it really depends on what technology you choose. Web Storage has pretty solid support in the latest browsers (if not the nightly builds), but it's relatively easy to patch missing support just using JavaScript which would map sessionStorage to the window.name hack and localStorage to cookies.

Geolocation can be detected and made use of if it's available, whilst those without the functionality can still map their position using something like Google Maps or a text field, thus taking a progressive enhancement approach.

Offline applications on the other hand can't be achieved if the technology isn't available - so it really depends on the application, it's use and whether you have a specific platform in mind for deployment (which generally I wouldn't encourage, but we know it happens).

Flash developers definitely have an easier time when it comes to deployment environment - in fact I've met a number of Flash developers now that said they made the shift from JavaScript and HTML years ago to Flash because of the appeal of a single environment: the Flash runtime.

Anything else on the subject?

As I said at the start of this post, I don't see this as an us and them, Open Web and Flash. I do see HTML5 plugging the areas that have been held up by Flash for the first decade of this century, and there are other areas that HTML5 supports that Flash doesn't - but Flash could even make use of, such as Offline Applications.

It's an exciting time on the web again where browsers are implementing features that make it an even more powerful platform to develop on. I for one, am keen as mustard to get building with the new shiny toys they're giving us. Equally, I'm certain Flash will continue to be used to build awesome shit (and probably some not so awesome shit) for a long time yet.

39 Responses to “HTML5 vs. Flash”

  1. Nice to read a dispassionate and accurate account of the different technologies. I'm excited about HTML5 as well.

  2. I'm glad someone else agrees that HTML5/SVC/CSS3/Javascript is far from a viable Flash replacement. Great rundown!

  3. Flash isn't going away any time soon, but at least now with HTML5 video, we have a good alternative. The rise of the iPad, iPhone and other mobile devices that don't support flash will all encourage less flash reliance in the future.

  4. Nice post. Interesting to see when the transcode providers will start to include the HTML5 codec in their products.

  5. Great view. Things should get better beyond time. HTML and Flash combination should do it as well.

  6. Flash is so taxing on CPUs it's ridiculous. If Adobe wants Flash to continue to be viable, they're going to have to fix this by offloading to the GPU. I honestly think Flash can stay around for the games, but there are many applications of flash that need to move on to better technology: Flash video, etc. It all starts with HTML5.

  7. Flash is going downhill as per my observations:

    1) No SEO support for swf files

    2) More and more people are moving towards HTML/CSS/JS as browsers are increasingly becoming powerful and fast except IE

    3) Flash costs more in the end as it is a commercial product and one needs Flash IDE or other alternatives to author flash content. Where as HTML/CSS/JS is completely free and can even be coded using notepad.

    4) Best of all - http://tv.adobe.com was completely made in Flex earlier. But they themselves have moved on to using HTML/JS/CSS/CFM for the content except the videos.

    BAM!!! If adobe is not using Flash themselves extensively (SPRY too as they have used JQUERY) then something is severely wrong in my opinion.

    Flash was good for animations and interactive apps but that all can be achieved by JS also today. Flash is good for videos I think. More and more companies are moving away from flash except in certain requirements.

    Just my 2 cents.

  8. HTML vs Flash... the endless war... but they can co-exist with each other, because there are cases when this or that technology can be inappropriate.
    No matter what they say, Flash has a long road left to travel.

    Thanks for the useful article!

  9. After being a die-hard Flash and Flex supporter for years, I am beginning to turn the corner on open web technologies. After building large scale Flex applications for the past few years I feel that Adobe has shot themselves in the foot by trying to be proprietary. Try using CSS in Flex and you know what I am talking about. By using their own flavor of CSS and completely misinterpreting the designer/developer workflow, I see no reason not to switch to open client side technologies.

    While I agree that Flash won't become obsolete anytime soon, I do believe we will see a gradual shift towards alternatives starting with online video. Apple is leading the way by omitting Flash from its mobile devices and I think others will follow.

  10. Overall I completely agree with what you are saying, but a point worth noting is Adobe will not easily relinquish its hold on video delivery - meaning they will fight hard to retain it, not meaning they will necessarily be able to halt a migration to an alternative. If the market does in fact move away from using Flash as the primary delivery mechanism for the web, it will could well change the whole equation, as Adobe will not throw the same resources behind Flash as it does today just to occupy a niche like the one Shockwave operates in today.

  11. The first sentence is gold. The rest of your post might be genius as well, but I admit I didn't read any further. Oh I love us, honest people...

  12. hey folks,

    don't forget that there are some serious discussions underway (between W3C and Web3D) for the integration of X3D into HTML5. This goes way beyond what Flash can do in 3D.

    So the arsenal may include: HTML-5, SVG, CSS3, JS, AJAX, and X3D!!

    Think of the potential for content developers ...

    - cogspace

  13. The main flawed arguments in favor of Flash today are two: that it's your best option for delivering video and games on the web.

    Regarding video, the only reason Flash was adopted en-masse is because at the time (around 2002) it was the only thing you could point your visitors to for installing a plugin and resting assured that they would see your videos, regardless of platform, codecs, etc. So the reason was a lack of standards, as HTML didn't had native support or recommendations related to audio and video content, and also lazyness from web developers in general. This is now solved with HTML5 recommendations for browser vendors on video and audio.

    About games, I always felt there's no good reason, if at all, to provide a game inside a page running inside a browser. It just don't make sense, from the user experience perspective, because games historically always ran fullscreen and using all the computer potential. It looks like people just had to explore the fact that everybody had Flash installed, so they started making games in it. Flash, and other tools, like Unity 3D, can be easily used for delivering games cross-platform in native binaries or bundles, without having to touch a browser or HTML in any way. So there's no reason that one thing should interfere with other (games should start being done with HTML+SVG+JS), and vice-versa. Specially because those technologies are NOT for making games. Period.

    For anything else, Flash is just something people use to fill the gaps, be it for creating (useless) hotsites, or hacking some strange interface together and trying to make a desktop application run inside a browser. Neither of these use cases are exactly relevant for the future of the web how it should be: a media for delivering content; instead of an interactive replacement for TV (what the hotsite guys think it is), or a platform for deploying full-blown applications (what the "online OS" guys think it is).

    Therefore, having HTML5 solve the audio/video delivery issue (and browser vendors like Mozilla, Google and Apple already kicking in this direction), Flash could die overnight as a plugin.

  14. I'm just now getting into using Flash for game development, an arena where HTML5 is unlikely to tip the balance. It is nice, though, to think that media like video and audio are going to get the proper inherent support without having to rely on third-party technology. Right tool for the right job and all that.

  15. Great article! I've only been developing for the web since 2006. I started out being a huge supporter of open source HTML, CSS, JS, etc. Then I moved into an almost all Flash environment. There is definitely a movement back to open source. Flash is great for rich media, games, etc. But the open source technologies are leading the way for our SEO and hand held device world. SEO is a must in today's marketplace!

  16. More and more people think that the better solution for Flash to better work with browsers is that Adobe Open source the Flash Player code and try to make Flash Player part of the Open Web.

    It would allow to use JavaScript to control or even in Flash, use the Flash as an adavanced graphic renderer in layers (and it works now and works very well on this) and finally access it by DOM and use HTML I18N to push text content in it.

    It would also allow browsers to better control its CPU comsumption because most of the CPU used by Flash at this time is used because Flash cannot detect that it runs in an hidden tab of the browser. Near 40% of the browsers installed use an open-source rendering engine. Embedding Flash as a native animation engine in it is a logic choice.

    You can vote to ask Adobe to open-source Flash Player by signing this petition: http://www.openplayer.net/

  17. I don't know why they are even being compared. When it comes to the canvas element performance is awful and so hard to use. Flash is not only easier to develop but most of the time has pretty good performance, despite what people say.

    Look at apps like http://aviary.com/ and they don't come close to what JS is realistically capable of. We've got a long way to go before we see a replacement of Flash.

  18. Personally, I feel like the H.264 license is the fundamental reason why the [video] tag will not take off anytime soon. It's a lot of fun to use the [video] tag, but the difficulty of maintaining several video formats and several players in different runtimes for all the different browser capabilities will make it unworkable for all but the smallest sites.

  19. I agree that HTML5 will not replace Flash, however, I think that if someone were to create an application that let you easily develop Flash like "movies" much like the Adobe Flash Designer does without requiring you to actually know how to program then yes, HTML5 could replace Flash. Really, that is the main thing keeping Flash alive... the majority of Flash Designers are not programmers and do not know the first thing about all the programming that is involved with building a real web site (with Ajax, DHTML, etc). I know, I've worked with and continue to work with Flash Designers who have no programming experience. They put together some great stuff though all due to the ease of Flash.

  20. Having said that though, you have just described flash being phased out for most of its uses on most websites (video, fonts, more advanced interactivity), so unless the average user's expectations of a what a website is changes drastically Flash will I think become a marginal skill in web development, in the sense that now a lot of front-end web development jobs ask for Flash skills, but in the future it will only be more specialised ones.