Flash really is a neat technology; it brought animation and dynamic content to the web years before the W3 standard enabled such feats. Now, on its ninth version, Flash is an ubiquitous part of the web. However, there’s always been a significant drawback to Flash, and that is its content’s invisibility to search engines. Way back in the Flash 5 days, the plugin was used exclusively for vector content and cartoon animation, and it certainly wasn’t used by any worthwhile web pages for any kind of serious content. However, as websites became increasingly desperate to stand out during the .com-boom, form was chosen over function, and now there are many sites that use Flash exclusively for all content. Let’s look at some of the downsides to this approach:
- Text loaded into Flash is not accessible by search engines
- Text in Flash is not browser-resizable, reducing accessibility
- Text in Flash is harder to print
- Graphics displayed in Flash can take longer to show up
- Links in Flash aren’t followed by web crawlers
It’s true that the html template for Flash does include the static text used in the movie as a html comment, but the interpretation of this information is entirely up to the web crawler; there is no guarantee it will be used for anything. Furthermore, if you’re using Flash’s ability to load either plain text or XML, and using that for content, this information will be 100% invisible to search engines. Accessibility is another major problem for Flash content. A typical Flash file is designed around a set size, and as such the content doesn’t resize with the fluidity of intelligently designed CSS. If a movie is 700×400, it will appear quite large on old-fashioned 800×600 monitors, quite small on 1920×1200 displays, and invisible on most portable devices (read: no plugin support). Resizing and accessibility features in Flash are primary opt-in. Either way, it doesn’t do you any favors in terms of search engine visibility.
Now let’s talk about some solutions.
The Flash route: If SEO isn’t important to you, feel free to ignore the shortcomings of Flash. That’s right — if your site is targeted to people who already know where they’re going, feel free to use as much Flash as you want. That said, I would still recommend putting in some clues for search engines: plain HTML describing your site, meta tags, etc. But what if you need Flash and really want to preserve search engine visibility? A great technique is to provide Flash and non-Flash versions of your site. Particularly if the content is dynamic or server-driven, creating a PHP page to render content out to regular HTML is a great idea. You can create the content once, and publish twice. Also consider that it’s probable that only web crawlers, outdated browsers and non-desktop devices will be viewing this version. In other words, feel free to use a recent version of Flash to provide the best experience when you have a HTML version to fall back on. If you expect a lot of users to use search engines as a portal, make switching over to the Flash version a one-click affair. It is also possible to overwrite the HTML content with a Flash file using JavaScript, although this process may unnecessarily increase load times.
The AJAX route: With very few exceptions, what was once only possible in Flash is now doable with AJAX. There are a variety of free AJAX libraries out there to take the headache out of cross-browser compatibility. Check out script.aculo.us which combines a cross-browser foundation (prototype) with eye-catching animations and effects. Instead of using complex parsing schemes to handle XML data and convert it into HTML using javascript, try just outputting regular HTML from your AJAX server script. Ruby on Rails features this ability natively with its partial template system: the same code that renders part of the initial page can be reused to output an updated version as per an AJAX request. It’s so easy in fact, that one line of code will be sufficient to add this functionality. PNG graphics also help bridge the gap between Flash and HTML. With alpha channels in images and CSS absolute positioning, a lot of what is popular to do in Flash can now be done with regular web technologies. Internet Explorer has PNG rendering issues, so check out this site to see a solution for this.
That said, there are times when Flash is the best tool for the job. Currently it’s by far the best way to get vector content to animate in a web page. It’s also more installed than any other plugin, so it makes a good choice for presentations and movies. It’s also more supported than AJAX may be, so depending on your target audience, you may reach more users with Flash than AJAX. However, any major browser released in the last three years can handle both with aplomb.
I have developed with both DHTML/AJAX technologies and with Flash. Flash has great potential as the programming abilities of the platform are now so robust. Flash’s rendering is also reliably fast and accurate, which cannot be said of all web browsers’ CSS support (IE I’m looking at you). Additionally Flash’s code is compressed, so in my experience it is actually possible to use Flash to save space instead of wasting it. For these reasons, a lot of artistic projects get the Flash treatment: the combination of client-side dynamic coding and complex cascading vector animations are a great duo. I really love web pages that are intelligent enough to lay out their own content based on data context. On the other hand, for corporate use, text-heavy and “serious” web sites, I tend to develop using traditional means. The vast compatibility, search engine optimization and predictable load times are the win in that case. Of note, it’s much easier to change designs using CSS than it is in Flash. For proof, check out CSS Zen Garden.
That’s all for now. Happy coding.
Nick Saretzky is a summer intern for Image Cog. He is a Senior at The College of New Jersey, and majors in Interactive Multimedia. His website can be accessed here.