Going HTML 5 Over Flash
Sunday, June 20th, 2010Designing my own portfolio has always been one of the most time-consuming projects because I, like any other designer, become my own harshest critic.
While I still intend to redo my company’s site in Flash, I decided in the meantime to redo my portfolio in an iPhone-friendly format by using only HTML, CSS, and Javascript (For those that might have come across my guest post on Fathom’s blog, I’m sure this must come off as an about-face). I didn’t really use HTML 5-specific tags like <header>, <footer>, etc., since my site needed to remain accessible, and I relied heavily on JQuery for the animation. Up until this point, I’ve read the complaints for and against both Flash and HTML 5, but this gave me the opportunity to guinea pig my own site and experience the issues firsthand.
Development Environment Differences
The first big difference I noticed was the work environment. JavaScript wasn’t really intended as an object-oriented language, and the work process felt much messier than building the site in classes (ala ActionScript). Furthermore, since many of the divs were hidden on page load, I felt that I wasn’t able to quickly preview elements during development. I ended up relying heavily on the Firefox Firebug plugin and going back-and-forth between the browser and the code.
Search Engine Accessibility
From a search engine standpoint, the differences between the two technologies feels somewhat of a wash. Both sites would have a page title and meta tags, so there’s no big advantage for either here. On the plus side for HTML, absolutely everything can be interpreted by all major search engines. Had I done the site in Flash, only Google would have been able to partially parse the SWF file. On the other hand, I couldn’t take advantage of separate URL paths or page titles like I could with Flash (with the addition of the SWFAddress). the only way I could have done this would be to force a page refresh–an interruption in the experience I really didn’t want to occur. Actually, Asual has the JQuery Address plug-in, which does the same thing as SWFAddress. Thanks @kweerious.
Font Options

The decision of HTML over Flash heavily impacted my font choices as well, since HTML pages are reliant upon client machines having the font installed. Flash, on the other hand, can simply embed the font. Granted, there’s alternatives, like SiFR and Cufón, however, I didn’t want to use Flash replacement text and don’t like the fact that Cufón doesn’t allow for text selection (neither of these options, by the way, seem to be intended for extensive font use).
Another option is to use the @font-face call with the Web Open Font Format (WOFF). This format places font files on the server for the HTML page to reference, and is currently the frontrunner for inclusion in the HTML 5 spec. WOFF is certainly the most elegant (see the recently-designed splash page I completed for metalledwith for example), however, because the font files are available on the server, the file can easily be downloaded illegally. Not wanting to infringe upon the license I have for Futura and not wanting to make all of the text into images, i simply used a safe system font (Trebuchet).
Browser Inconsistencies
A good front end designer ensures that their Website renders consistently across a variety of browsers. In the case of Flash, there’s really no need to test, as the plug-in ensures consistency across browsers and platforms. In my case, Internet Explorer protested to using transparent PNG files, so it required additional code. Furthermore, while the code I used to generate an image reflection is proven to work in IE7, it didn’t want to work with how I built the reflection into the JQuery Cycle plug-in. I’m sure there would have been a way to make it work, but frankly, I didn’t feel it was worth the time–besides, IE users should already be accustomed to limitations.
Performance
Performance-wise, I was a little surprised to see that the animations were sluggish on the iPad and iPhone in comparison to their desktop counterparts. Granted, JQuery isn’t the fastest JavaScript framework on the market, but I was expecting at least slightly better performance compared to how Flash performs on Android devices. Overall, I suppose it only reinforced my agreement with Apple that intense animations in Flash would yield poor performance on their mobile devices.
My biggest issue with the end product, though, is how the site downloads. I’ve seen it before–JavaScript-based sites can’t preload animations or elements well, and therefore animations start playing before all of the elements have downloaded. The reason for this is because the HTML page attempts to download all of the elements contained in it–even if they are set not to display.
I’m a firm believer that you don’t tax the user with downloading content they haven’t requested, so I tried implementing the LazyLoader plug-in to ease the site download. I honestly don’t have complete faith in this plugin, but fortunately, the site is relatively small. Regardless, Flash currently blows HTML out of the water with its programmatic ability to queue and download content without requiring a page refresh.
Conclusion
I’m sure that the development tools will continue to evolve and I’m not claiming that my implementation of the all the various plug-ins was constructed in perfect harmony (anyone out there, please correct me if there’s a better approach). In the end, this endeavor opened my eyes to some of the things JavaScript can replace Flash for, but HTML 5′s inability to create a length presentation (without a page refresh or complete asset download) makes me believe that Flash isn’t going anywhere for a long time.


