Silverlight More SEO Friendly than Flash? I Call Shenanigans

Okay, I can’t take it any more. I like Silverlight, but this whole notion that Silverlight is SEO friendly because XAML, the presentation layer, is exposed as plain text is bogus. Let’s take the Silverlight airlines demo as an example. It’s written in the 1.1 alpha, which is what most developers are targeting. To add the Silverlight control to a page you call a JavaScript function linked by an external .js file, in this case, CreateSilverlight.js.

Here’s what that function looks like (excuse the formatting):

[js] function createSilverlight() {
Silverlight.createObjectEx( {
source:’Default.xaml’,
parentElement:document.getElementById(‘AgControl1Host’),
id:’AgControl1′,
properties:{width:’100%’,height:’100%’,version:’1.1′,isWindowless: ‘True’,background:’transparent’},
events:{ onLoad:onLoad, onError:null },
initParams:null, context:null}
);
} [/js]

So the page that contains the XAML is referenced in a source variable passed into the createObjectEx function. First question. Do search engines even know what to do with this? Can they tell that Default.xaml is where it’s supposed to go to grab the presentation? I can’t see how they would. But lets assume they do, so they go spider that file and index the content. Here’s what they’ve got:

[xml]
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:app="clr-namespace:Mix07;assembly=ClientBin/SilverlightAirlines.dll"
x:Name="rootCanvas" Loaded="PageLoaded"
x:Class="Mix07.DefaultCanvas;assembly=ClientBin/SilverlightAirlines.dll"
Opacity="0.85" Width="1093" Height="488">




[/xml]

Wow! That is incredibly helpful, isn’t it? Well congratulations, all of the content in your Silverlight application has now been indexed by Google. I’m not really sure how much good that will do you because most of the logic and data seems to be hidden in DLLs, but hey, your XAML is indexed, right? Look at how little XAML is even exposed in an app like this. Does anyone see how having this indexed is beneficial?

I’m not trying to pick on Silverlight, just the people that spout the virtues of the SEO bit. RIAs are a difficult thing to expose to search engines. Do you want them to index the state of the application? No, you want them to index the content and ideally, for something like a storefront, be able to deep link into that specific item, in “focus”, in your RIA. Silverlight doesn’t make that any easier, so people should stop comparing Silverlight and Flash on the grounds of searchability. It doesn’t fit in this instance and the whole SEO/RIA problem is something we still need to think about on both sides of the fence.

Update: I’m sorry the formatting on this is terrible. If you have a good way to display code in WordPress, let me know.
[tags]Silverlight, Flash, SEO, Rich Internet Applications[/tags]

Related posts:

  1. Silverlight vs Flash – Point/Counterpoint
  2. RIA and Flash/Silverlight Debate Spills onto Facebook
  3. Lee Brimelow on Silverlight
  4. The Silverlight Airlines Demo is Awesome
  5. My Interview with the Silverlight Team
  • Pingback: RIA pedia - Rich Internet Applications - Its all about the user experience!

  • http://blogs.katapultmedia.com/jb2 John C. Bland II

    Ryan, great points. This same discussion came up on our local .NET UG and I had a very similar response. It is crazy how people think code files being available to an SE means their app is suddenly more accessible let alone your point about RIA’s.

    Heck, JS is available to SE’s, and has been for years, but you don’t see Ajaxified apps with better SE status. Silverlight is no different.

    Anyway…I could rant more but bottom line…I agree. :-D

  • http://lazycoder.com Scott

    I use the IG:syntax highlighter plugin. It lets you embed code blocks using [code]

    http://blog.igeek.info/wp-plugins/igsyntax-hiliter/

    How does Flash solve the SEO dilemma?

  • http://richardleggett.co.uk Richard Leggett

    Interesting post Ryan, SEO is unbelievably still a hot topic. With regards to the last question there (from Scott), I was going to post an article on this because it seems to come up a lot and there is a valid solution that doesn’t require any hacks.

    It’s fairly easy to make Flash sites search engine friendly, we just finished a very large site for a car manufacturer that had this as a requirement. There’s a LOT of Flash and video in that site, but turn off Javascript/Flash and take another look and you’ll see the same content (where applicable), just static.

    There are a couple of requirements though:

    - The Flash must be deep-linkable (plenty of solutions out there if you don’t have your own framework in place). I recommend having History Management as a core feature of your site framework as it makes things so much easier to scale/add to.

    - The deep links must match up to content on the server, be it text, images, things only the Flash might need such as keytimes for an animation (more specifically, this would be a CMS).

    The thing is most CMSs are set up for the concept of pages, but this is fine, it’s just a metaphor that Flash can interpret as a “state” which is usually the more applicable concept.

    Here’s what happens:

    - When a user navigates the site, the URL changes with a changing anchor tag showing the “deep link”. This demonstrates the “page” metaphor, more specifically it’s a state that your site is in, in a grander “tree-like” structure that is the whole thing. Deep links should support parameters for RESTful URLs.

    - When Google hits the site, it sees/spiders the HTML links and copy/images, it doesn’t see the Flash at all but it does see the same content, presented as XHTML by transforming data in a CMS using a serverside language, or in most cases, pure XSLT.

    - When someone clicks a spidered link from Google, and they have Flash, the HTML is replaced with the Flash movie, and a FlashVar is passed in with the relevant deep-link. Flash can then make a request to the CMS to load the content for the given link.

    The whole process is made much easier through using a CMS but the alternatives include passing in XHTML from the page itself, or not using a CMS, but storing the data in a database that is indexable by deeplink in some fashion.

    The long and short though, is that you need to generate purely semantic data that Google can understand. At present that’s XHTML, and I think it does a really good job of that, however it is lacking as a datasource for your Flash content, so it needs to be bolstered with other things on top that isn’t HTML displayable (such as paths to video files, or timings for subtitles), EKTRON is one such CMS that allows this to be done easily via “smartforms”.

    The other key consideration is that the navigation for the site should be shared between the HTML version, and the Flash version, to keep things consistent, but this isn’t totally essential (it just makes adding new sections automatic).

  • http://blog.danmcweeney.com dan mcweeney

    I use Windows Live writer to do all my blogging now. It supports WordPress and other platforms. You can write blogs in the “native” look of your blog too, it downloads your CSS so you can see what the published post will look like.
    For code formatting I use a Windows Live Writer plugin aptly named Source Code Formatter. It works pretty well, every once in a while it crashed but, I never loose my work.

  • Davo

    SEO for Applications? Huh? They’re applications – dynamically generated code based on a user login, why would I need SEO for that? Why would I want it? I already have web based applications and they are not indexed by search engines – they ignore code and look for HTML content.

    The sooner we all get past this “web page” mentality, the easier it’ll be for us to grasp these technologies.

    Cheers,

    Davo

  • Pingback: JD on EP

  • http://work.rowanhick.com Rowan Hick

    On the syntax highlighter’s I use wp-syntax, but it has an issue as soon as you edit a post it changes all open/close brackets in html entities. Must figure out how to fix it. Anyway, check it out, does fine for MXML/Ruby/Actionscript highlighting.

  • http://blog.digitalbackcountry.com Ryan Stewart

    @Scott – thanks, I’m installing that as we speak. And I don’t think Flash does solve the SEO problem. Both of them need work.

    @Richard – you should copy that into a blog post, it’s good stuff!

    @dan – I used Windows Live writer for a while and loved it, but then it did something wonkey to my CSS on the site. Not sure what happened but I got scared.

    @Davo – I know, I know. But people want to be able to search the content inside an application, so we need to figure something out for that.

  • http://www.asual.com Rostislav

    A friend of mine reported that the “SEO for Silverlight” session at Microsoft ReMix 2007 Budapest was nothing but a showcase how the effect is achieved at miniusa.com – a combination of URLRewriting, SWFObject and SWFAddress. I believe that the innovation in this area will continue to come from the Flash and open source land.

  • http://danny-t.co.uk DannyT

    Re: Davo – I used to agree, however what we have with web-based applications are applications available to a near limitless audience.

    If my application is aimed at an open audience, and parts of it do not require a secure login then I might WANT the wonderous content within (whatever that may be) to be indexable. Because RIA’s are applications doesn’t mean that because traditional applications aren’t indexable then RIAs shouldn’t be.

    RIAs are a new wave and if part of that is indexable application content and if that has business merit for some then let it be and let us find solutions to acheive such – Rich’s approach is a good one and in my opinion one that will be used for Silverlight RIAs as well.

  • Pingback: SEO in Silverlight | RIABG.org

  • Useless

    bunch of BS, glad to see Ryan is spending time on helpful commentary. RIA and search, especially with Flash like sites is a ton of crap, and anyone trying to make a point about it obviously doesn’t know web 101

  • http://blogs.katapultmedia.com/jb2 John C. Bland II

    Come on Useless…show your face. That’s the only bull I see. ;-)

  • http://blog.digitalbackcountry.com Ryan Stewart

    Hah! Sweet! An anonymous troll. You could have turned that into a valid comment too Useless. I’m not saying Flash sites are GOOD at SEO. Just that it’s inaccurate to say Silverlight sites are better.

  • http://blog.iconara.net Theo

    Someone touched the subject in the comments, but I think it deserves to be mentioned again: SEO totally breaks down when the application requires that you log in, or in any way identify yourself, which most applications do (depending on your definition of “application”, a website in Flash isn’t necessarily an RIA, but some call it that). This is true for any RIA regardless of platform, it is even true for traditional web applications.

    Most people don’t seem to understand what it means to index an RIA. Very few would say that Google Desktop should index Microsoft Word, but still think that Google should index their RIA:s.

    I’ve written more on the subject here: http://blog.iconara.net/2007/05/08/google-and-flash/

  • http://www.zeuslabs.us/ Josh Tynjala

    Ryan, you just hit a nail on the head, and I’m glad someone else pointed out this exact issue. I’ve been trying to get this through people’s heads for a while now.

    Buttons, Lists, and other user interface parts of an application don’t need to be exposed to a search engine. They don’t provide relevant information to someone looking for information. What would a crawler find relevant from the user interface from Microsoft Word, or, now that word processing is moving to the web, Google Docs or Buzzword? There’s nothing useful there. If you search for “bulleted list” in a search engine (simple example), you’re better off finding the documentation or feature list of a word processor than loading the app itself without any explanation.

    For 99.9999% (number from my rear) of Rich Internet Applications out there, the content you want searchable is the following:

    1. Feature lists and descriptions of the apps purpose. These get users interested in the product. Obviously, if you’re loading your application in a browser, HTML is the best choice to display this information.

    2. Documentation. Keeps your users working with your product because they can fix their problems. Same thing: If you aren’t using the browser’s HTML engine to display all this text, you’re silly.

    3. The data the app loads at runtime. This one isn’t always true. As someone else mentioned, it may be behind secure authentication. If the content is publicly available, then you probably want it found. A simple example might be an XML file of data. When you load that file in a browser, the XSLT engine will swap out some stuff and load your application with that data inside.

    Want an example? Go to directory.onflex.org and view the page source. You don’t see any HTML or declaration of SWFs. This is how you make a Flash or Silverlight app SEO-friendly. Who cares about the XAML or SWF? That’s just presentation. It’s all about the data. In the same vein, who cares about CSS and JS? It’s all about the semantic HTML (the data).

  • Pingback: How to make your hot new RIA friendly to search engines » Zeus Labs

  • http://www.reactiondynamics.com Mo

    Spot on with this post, Ryan. While personally I don’t believe it’s necessary for SEO in UI’s, Silverlight is NOT more SEO friendly and the example is a good proof.

  • Pingback: SiloMatic

  • Pingback: Just Flashing - Today’s Top Blog Posts on Flash - Powered by SocialRank

  • http://www.onmeco.de/ Suchmaschinenoptimierung

    Hello,

    thank you Ryan for the blogpost, but in my opinion we don´t need seo for this.

  • Pingback: Silverlight - Oh no, not this again | PHP vs .Net

  • http://www.dishbird.ru Alex

    Heck, JS is available to SE’s, and has been for years, but you don’t see Ajaxified apps with better SE status. Silverlight is no different.

  • http://www.smsalien.com Sheen

    I really liked Silverlight up until about 10 minutes ago. Great post well delivered, I actually didn’t know most of that.

    Thanks for opening my eyes, that had some great keypoints, factual and easy to understand.

    I understand you have nothing against silverlight, well I hope not, I understand that it can be a bit annoying when one person says something and everyone sheepishly follows. This really helped me to understand!

    Added to my favorites for safe-keeping.