WEBSITE

Developing an SEO-Friendly Website : Optimizing Flash (part 2)

1/7/2011 9:16:39 AM
2.4. SWFObject and NoScript tags

Because “alternative content” workarounds for SEO of Flash files have been historically abused by spammers, it is challenging to recommend these tactics to optimize your Flash files without a critical disclaimer.

Both the SWFObject and NoScript methods were originally designed to be legitimate, graceful degradation tactics readily accepted by the search engines as a way to accommodate older browsers or people with special needs. But many unscrupulous sites have used the code to trick search engine spiders. In other words, they are used in such a way that browsers display one thing to users, but display something completely different to search engine spiders. All of the major search engines disapprove of such tactics.

Websites using such methods today are often penalized or removed from search engine indexes altogether. This makes graceful degradation risky on some level, but if the methods are used clearly within the boundaries for which they were intended, getting penalized or banned is highly unlikely.

Intent is an essential element search engines take into consideration. If your intent is to provide all users with a positive experience while visiting your site, you should be fine. If your intent is to game the search engines, all it takes is one online rival to report your site for spam to incur the wrath of the search engines.

Google and other search engines do not algorithmically ban sites for using SWFObject and NoScript tags; it usually requires human intervention to evoke a penalty or outright ban.

2.4.1. SWFObject

With regard to Flash optimization, SWFObject is the better of the two options because it is JavaScript code designed specifically for Flash .swf purposes, and it has been abused to a lesser extent than the NoScript tag option.

SWFObject is Flash detection code written in JavaScript that checks whether a browser has the Flash plug-in. If the browser does have the Flash plug-in, the .swf file is displayed secondary to that detection. If the browser does not have the Flash plug-in or the JavaScript to detect it, the primary, alternative content contained within <div> files is displayed instead. The key here is that search engine spiders do not render the JavaScript. They read the primary content in the <div> tags.

The opportunity for abuse is obvious upon viewing the code. This small piece of code is placed within the <head> tags:

<script type="text/javascript" src="swfobject.js"></script>

In the body of the text, the code looks something like Figure 3.

Figure 3. Information between the <div> HTML tags read by search engine spiders


Search engine spiders will read text, links, and even alt attributes within the <div> tags, but the browser will not display them unless the Flash plug-in isn’t installed (about 95% of browsers now have the plug-in) or JavaScript isn’t available.

Once again, the key to successfully implementing SWFObject is to use it to the letter of the law; leverage it to mirror the content of your Flash .swf file exactly. Do not use it to add content, keywords, graphics, or links that are not contained in the file. Remember, a human being will be making the call as to whether your use of SWFObject is proper and in accordance with that search engine’s guidelines. If you design the outcome to provide the best possible user experience, and your intent is not to game the search engines, you are probably OK.

You can download the SWFObject JavaScript free of charge at http://code.google.com/p/swfobject/. Included in this download is the flashobject.js file, which is placed in the same directory as the web pages upon which the corresponding calling code resides.

2.4.2. NoScript

The NoScript tag has been abused in “black hat” SEO attempts so frequently that caution should be taken when using it. Just as SWFObject and DIV tags can be misused for link and keyword stuffing, so too can the NoScript tag. Certain companies have promoted the misuse of the NoScript tag widely; consequently there have been many more problems with their use.

With that being said, conservative and proper use of NoScript tags specifically with Flash .swf files can be an acceptable and good way to get content mirrored to a Flash file read by search engine spiders. As it is with SWFObject and corresponding DIV tags, content must echo that of the Flash .swf movie exactly. Do not use them to add content, keywords, graphics, or links that are not in the movie. Again, it is a human call as to whether a site or individual page is banned for the use or misuse of NoScript tags.

You use NoScript tags with Flash .swf files in the following manner:

<script type="text/javascript" src="YourFlashFile.swf"></script>

Followed at some point afterward by:

<noscript>
<H1>Mirror content in Flash file here.</H1>
<p>Any content within the NoScript tags will be read by the search engine
spiders, including links
http://www.mirroredlink.com, graphics, and corresponding Alt attributes.
</noscript>

For browsers that do not have JavaScript installed or functioning, content alternatives to JavaScript-required entities are displayed. So, for use with Flash .swf files, if a browser does not have JavaScript and therefore cannot display Flash, it displays instead the content inside the NoScript tags. This is a legitimate, graceful degradation design. For SEO purposes, as it is with SWFObject, the search engine spiders do not render the JavaScript and do read the content contained in the HTML. Here, it is the content in the NoScript tags.

2.5. Scalable Inman Flash Replacement (sIFR)

sIFR is a technique that uses JavaScript to read in HTML text and render it in Flash instead. The essential fact to focus on here is that the method guarantees that the HTML content and the Flash content are identical. One great use for this is to render headline text in an anti-aliased font (this is the purpose for which sIFR was designed). This can provide a great improvement in the presentation of your site.

At a Search Engine Marketing New England (SEMNE) event in July 2007, Dan Crow, head of Google’s Crawl team, said that as long as this technique is used in moderation, it is OK. However, extensive use of sIFR could be interpreted as a poor site quality signal. Since sIFR was not really designed for large-scale use, such extensive use would not be wise in any event.

3. JavaScript and AJAX

As we mentioned previously, the search engines cannot see any content that does not appear immediately in the source code for the web page. Content and links that are dynamically retrieved in response to a user action or some other event and then embedded in the page cannot be seen by the search engines. However, content that is embedded in the HTML of the page, and JavaScript that is simply used to render it, can be seen by the search engines. There is also some evidence that Google follows links implemented in JavaScript, as detailed in the article on SEOmoz at http://www.seomoz.org/ugc/new-reality-google-follows-links-in-javascript-4930.

AJAX implementations can also be very challenging. The main challenge is that most implementations render new content on the page, but the URL does not change. To build AJAX applications that present indexable content to the search engines, make sure to create new URLs that point to the various versions of the content, and then make sure you link to those locations from somewhere on your site.

Use of the NoScript tags to render alternative content for the benefit of the search engines is useful in addressing basic JavaScript applications, but less useful with AJAX, since there may be an infinite (or very large) number of different types of output from the tool, and it would not be feasible to render them all within the NoScript tags.
Other  
 
Most View
Best Free Apps For Night’s Top FREE Smartphone And Tablet Apps
Asus God Raidr Express 03_2014 (Part 2)
Windows Server 2003 : Configuring a Windows IPSec Policy (part 4) - Using Group Policy to Implement IPSec, Monitoring and Troubleshooting IPSec
Bin Your ISP Router (Part 5) : DrayTek Vigor 2710n, Edimax BR-6478AC
Windows Server 2008 and Windows Vista : Advanced Group Policy Management - Change Management
SyncMaster S24B750V - Stylish Monitor To Mirror Smartphone's Display
MSI GX60 Review - Radeon HD 7970M In A $1,200 Gaming Notebook (Part 6)
Samsung Chromebook - Is It Worth The Value Equation (Part 1)
All You Need To Know About iOS 6 (Part 2)
Asus Eee Pad Transformer Prime
Top 10
Sharepoint 2013 : Farm Management - Disable a Timer Job,Start a Timer Job, Set the Schedule for a Timer Job
Sharepoint 2013 : Farm Management - Display Available Timer Jobs on the Farm, Get a Specific Timer Job, Enable a Timer Job
Sharepoint 2013 : Farm Management - Review Workflow Configuration Settings,Modify Workflow Configuration Settings
Sharepoint 2013 : Farm Management - Review SharePoint Designer Settings, Configure SharePoint Designer Settings
Sharepoint 2013 : Farm Management - Remove a Managed Path, Merge Log Files, End the Current Log File
SQL Server 2012 : Policy Based Management - Evaluating Policies
SQL Server 2012 : Defining Policies (part 3) - Creating Policies
SQL Server 2012 : Defining Policies (part 2) - Conditions
SQL Server 2012 : Defining Policies (part 1) - Management Facets
Microsoft Exchange Server 2010 : Configuring Anti-Spam and Message Filtering Options (part 4) - Preventing Internal Servers from Being Filtered