Search Engine Optimizing Your Flash Site & More

  • Search Engine Optimizing Your Flash Site & More

    Search Engine Optimizing Your Flash Site & More

    Posted by FIZIX Richard on Wed 15th October 2008 9:15am

    In this article we will be discussing SEO, accessibility and general best practices for rich internet applications built using Flash. We're quite vocal about our feelings on the suitability of Flash for websites; that being, we should not write off an entire platform because it isn't perfect but as developers should seek solutions to the problems. Before we begin, we are not advocating that Flash is suitable for any website as that's simply not true; there are however places where Flash is beneficial, such as when you are trying to create particularly engaging user experiences, sites that rely heavily on multimedia content, gamification and the likes.

    In our article Getting browser features to work in Flash we discussed using SWF Address to enable browser features and deep linking in full Flash websites; effectively resolving various usability issues that many claim Flash cannot do; which was clearly untrue as we proved.

    What SWFAddress works to resolve is browser feature support such as the back/forward button, accessing specific pages within a flash movie from the URL, updating the URL as you navigating a flash site. What it does not solve however is search engine optimization, non flash browsers and accessibility issues such as screen readers. The common consensus, which is held even by the most reputable SEO firms and consultants is that you can't optimize Flash websites for search engines and that they are simply incompatible with accessibility standards.

    To be blunt, this is untrue; what they are describing isn't a problem with Flash as a platform but with the teams who are creating these sites. The problem isn't that you can't index a Flash site or meet accessibility standards; it is that developers aren't bothering or are unaware of how to meet these standards.

    So, in our previous article we discussed browser features, in this on we will discuss SEO, screen readers and accessibility. The answer to our problem is a JavaScript class called SWFObject, which works hand in hand with SWFAddress to solve two of the biggest hurdles where Flash accessibility and SEO are concerned.

    The way SWFObject works is simple; when you've created your Flash RIA, you prepare your application as a HTML website; following the normal standards and then use the SWFObject Javascript class to deliver the flash version and fall back onto the HTML version.

    This solution will solve 3 problems:

    1. Search engines will always have the HTML version of you're site for indexing, so you can handle SEO as if you were working with a HTML website.

    2. Screen readers will have access to the HTML version, giving visually impaired users the same experience as everyone else

    3. Those without Flash (or who choose to turn flash off) will gain access to the HTML version.

    Tie this in with the URL updating and deep linking capabilities of SWFAddress and you're away. Like many problems, the best solution is one that is simple; for which this is one of them. It's a straight forward, easy to implement solution to one of the biggest problems RIA developers; and in turn users; face.

    There is one big drawback though; that you need to deliver a HTML version of the site in the background as alternative content. You can go a long way to resolve this by going dynamic; so you're content is CMS driven and your UI delivered through a template engine. It's more work, but where a Flash site is required it's a small price to pay in order to resolve such a significant problem.

    Of course, all this is only relevant if creating a Flash website is purposeful in the first place (see the opening paragraph).

    Note: This article has been updated to provide links to the latest versions, while somewhat out of date (see HTML5 and JavaScript/jQuery/AJAX) the principals are still relevant to those who need to use Flash (there are cases where Flash is still the best solution available right now).