Are Flash only sites the SEO Devil?

I have run an update to this post on my blog timnash.co.uk: Does Flash SEO still suck?

Nothing gets up the semantic web developer lobby noses more then the bane of their lives Flash. After spending months developing perfectly semantic well formed XML compliant HTML some upstart art herbet comes along and ruins their day by showing the boss his latest web site. No amounts of appeals about it won’t be searchable or accessible will help. The lure of flash is to great for many companies and while you may be saying its not accessible the boss is pointing to large corporate sites like Marks and Spencers and Starbucks are using it and ultimately you will loose the battle, but wait this story is not over the Arty farty herbert is a web designer and hasn’t got a clue what your talking about when you mention htaccess and so you end up having to actually launch this monstrous baby, sounding familiar?

Adobe Flash (formally Macromedia) is a great tool for developing highly artistic multimedia applications, it has the accessibility and searchability of a brick. If you are serious about getting organic rankings the only advice is stay away from Flash, I mean it stop reading this post it will not help!
Still here? You either failed to read my last sentence or are being forced into this satanic world so lets get on with trying to make flash searchable.

The partial page route

This is probably the most common use of Flash, a normal HTML page which has one or more flash elements embedded within the page, these items are slide shows or other “multimedia” elements. This is the least problematical way to use flash, as most of the page is searchable in such scenarios you can simply;

  • Avoid placing text or limiting the placement of text within a Flash file
  • Make sure navigation between pages is still possible without Flash
  • For slideshows and similar make sure there is a static equivalent

So the damage of using a small amount of Flash is quite limited in many ways treat them like images, make sure you can navigate without them and that your keywords are in text not the Flash file.

Full page of Flash

With a full page site we have more of an issue we now have no framework to base our site around only a large binary blob this poses a few problems;

  • No semantic information at all!
  • Not accessible and therefore breaching most EU disability guidelines (those things again!) which can end up with your site getting a fine or being sued!
  • Doesn’t help people without flash

The traditional way to get round this was to create a non Flash version of the site with it’s own structure on a separate page, which is fine and works well except those pesky search engines sent the traffic to the non html version of the site! Don’t get me wrong at least it gets visitors but there has to be some neater ways to get round this problem. Enter SWFObject a very neat Javascript class that allows us to use our html version on the same page as the flash version.

How does it work

It uses a technique similar to the way AJAX scripts handle on the fly messages, lets take a really simple example;

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Hello World </title>
<script type="text/javascript" src="swfobject.js"></script>
</head>
<body>
<div id="flashcontent">Hello World</div>
<script type="text/javascript">
var so = new SWFObject("helloworld.swf", "helloworld", "400", "200", "8", "#000000"); so.write("flashcontent");
</script>
</body>
</html>


So in the above example we have a flash file called helloworld.swf I wonder what could be inside! the rest is pretty straight forward, when the page is launched the flash detection script is launched if Flash is discovered the html between the div tag are placed with the flash file. So non Flash enabled browsers and most search engine bots will see the HTML version our nice semantic optimised code, while the rest of the world will see the Flash file.

Now through SWFObject we have a great deal of granularity and control for example

<script type="text/javascript">
var so = new SWFObject("helloworld.swf", "helloworld", "400", "200", "8", "#000000"); so.write("flashcontent");
</script>

The 8 in this example refers to the version of Flash that is required so in this case version 8 or higher, earlier version simply degrade to the HTML. Simple and cool huh but wait I see problems ahead!

Multi page sites

So far we have covered including flash on a single page and as part of a html page, but we haven’t really discussed how to create multi page sites.
Of course the obvious thing to do is use the above technique on each page, and link between them, however you will find it difficult to create seamless transitions from one swf to the other. However if going down this route the answer is pretty simple we simply create page entry points within the movie and then pass a variable to the flash file from the embed object or our SWFObject file. To do this using the SWFObject you need to add the variable within the javascript;

<script type="text/javascript">
var so = new SWFObject("helloworld.swf", "helloworld", "400", "200", "8", "#336699"); so.write("flashcontent");
so.addVariable("myvariablename", "variable");
so.write("flashcontent");
</script>


Notice the so.write part this tells the javascript it has finished passing additional arguments (so goes at the end!) obviously the variable names and variables would work best when related to the page but that’s pretty much it.

Organising content the sensible way

By now you must have been thinking that it will take me for ever to organise all this data not to mention keeping it updated, well the obvious answer is to include the data and content of the page in a database and then access it through a third programming language by far the most common way to do this is using PHP/MySQL and Flash Kirupa has a great tutorial which will get you started and is well worth a read. You could of course use ASP or any other programming language, a more “semantic” way to do this would be to use some sort of XSLT transform but that’s well and truly outside the scope of this post.

Alternatives to SWFObject

Through out this article I have refered to SWFObject however a second class exists called Unobtrusive Flash Objects (UFO) built around the same concept and conceptually very similar to SWFObject there is not much between them so take your pick of which one you like and stick with it.

Summing up

Flash is the Devil and nothing we have done here will let a search engine crawl a Flash file, but we have provided a mechanism to have best of both worlds but at the cost of your sanity, even using PHP mysql backend the above is hard to maintain, we didn’t even cover using htaccess to create aliases maybe another post for another time? If your the web developer from the beginning I pity you and if you think I might have called you an arty farty person perhaps this gives you an idea of the headache you cause web developers! only joking, no flames please.
Update:I almost forgot the other useful tool SWFAddress provides some useful deep linking features to flash and a way to integrate with the back and forward button on the browser, it works on top of the SWFObject.


Subscribe to The Venture Skills Blog by Email

PodcastAll our Posts are audio subscribed for more information see here, and to access the podcast feed here


RSS icon This blog is moving soon, make sure you move with us by using our Feedburner RSS feed, if you have used the autodiscovery button in your browser you may need to swap feeds, simply delete the old feed and add, http://feeds.feedburner.com/VentureSkills For a more detailed explanation on feeds and recieving our content in various formats click here

12 Responses to “Are Flash only sites the SEO Devil?”

  1. John Dowdell Says:

    “Flash is the Devil and nothing we have done here will let a search engine crawl a Flash file….”

    A search on “swf seo” beforehand would likely have showed you engines do grab the text within SWF.

    (For accessibility, screenreaders such as JAWS can actually get a better presentation with SWF. Again, this info has been readily searchable the past five years.)

    Dynamic text in sites (database-fed, eg) rarely shows up as pages within WWW search engines. How will people actually look for you?

    Step #1: Identify the search terms your audience would likely use to find you, and your competition for those terms.

    Step #2: Get good TITLE and other metadata for those terms, then try to get good inbound links with suitable anchor text for those desired search terms.

    jd/adobe

  2. Venture Skills Team Says:

    I was wondering who would take the bait first, first of all the quote you pulled is still factually correct as I didn’t touch the swf file I couldn’t have made it easier to search ;)

    Regarding your suggestions these are standard SEO practices and do not differ with regard to SEO on a flash site or any other, however a complicated Action script driven site is not very search engine friendly is it? and while I’m fully aware Jaws has had the “limited” ability to read flash files have you actually tried, did it make the remotest bit of sense?

    The above is a method that allows the best of both worlds, it provides a mechanism to allow people and search engines, who don’t or would be presented with a better chance of understanding text, to “see the site”.

    Dynamic text in sites (database-fed, eg) rarely shows up as pages within WWW search engines. How will people actually look for you?
    uhuh guess we will leave that there then and how is a dynamic page not crawled, or are you saying that nearly every CMS out there is not being crawled?

    As for searching for SWF SEO the article was heavily researched and based on personal expertise as some one who has been brought in to solve issues surrounding Flash sites failing to be crawled, I am certainly not alone in using this method, and it has been documented in various forms for the last couple of years.

    I made this post deliberately provactive partially to get across how frustrating it is to have to work on such sites from the point of view of an SEO or indeed content manager, flash designers (like all of us) have a tendency to develop nice looking sites, where accessibility and search are the last thing on there mind and even those who use the tools either have to limit the scope of their ideas or come up with work arounds this is purely an example.

  3. The Venture Skills Blog Microformats for search a real possibility? « Says:

    [...] Posts Want to create a site like Digg with no programming?Stumbleupon vs Digg - Voyeurs vs SheepAre Flash only sites the SEO Devil?CCK & Views the ultimate combination - part 1Create a site like Digg - Part2Create a site like [...]

  4. The Venture Skills Blog 5 CSS Fonts & Typography Tips « Says:

    [...] an article without covering sIFR the Javascript and Flash script, that uses a technique similar to SWFObject to “swap out text” and replace it with flash, which is a vectorised version of the font [...]

  5. The Venture Skills Blog Cloaking is ok says Google « Says:

    [...] have already covered using SWFObject in our look at making flash sites SEO friendly but its worth just quickly revisiting it works in much the same way as sIFR and many ajax based [...]

  6. Richard Says:

    Hi there,

    I am not a web developer but I am trying to help out a friend. The front page of the site is made up of 2 flash movies and other bits. I have successfully used the SWFObject and can call 1 .swf file and create an html file which only shows if the oerson does not have flash. Can I call 2 .swf files?

    thanks in advance

  7. Venture Skills Team Says:

    yes you can call the script multiple times on the page without any problems :)

  8. Richard Says:

    and how do i do that? which bit do i need to copy and paste and replace the.swf for each movie

    Thanks

  9. Venture Skills Team Says:

    Just repeat this section

    <div id="flashcontent">Hello World</div>
    <script type="text/javascript">
    var so = new SWFObject("helloworld.swf", "helloworld", "400", "200", "8", "#000000"); so.write("flashcontent");
    </script>

    For each time you call the file change the div id both in the div tag and in the script below it. So each section is unique for example

    <div id="flasharea1">Area 1</div>
    <script type="text/javascript">
    var so = new SWFObject("area1.swf", "area1", "400", "200", "8", "#000000"); so.write("flasharea1");
    </script>

    <div id="flasharea2">Area 2</div>
    <script type="text/javascript">
    var so = new SWFObject("area2.swf", "area2", "400", "200", "8", "#000000"); so.write("flasharea2");
    </script>

  10. Richard Says:

    Thank you very much that works a treat…

  11. Flash 與 SEO « 就是愛程式 Says:

    [...] Are Flash only sites the SEO Devil? [...]

  12. Does Flash SEO still suck? • Tim Nash UK SEO Blog Says:

    [...] in April last year I wrote a piece called Are Flash only sites the SEO Devil? it wasn’t ground breaking but did manage to bring out an Adobe Developer who made some pretty odd [...]