Question

Ok, I'm using the term "Progressive Enhancement" kind of loosely here but basically I have a Flash-based website that supports deep linking and loads content dynamically - what I'd like to do is provide alternate content (text) for those either not having Flash and for search engine bots. So, for a user with flash they would navigate to:

http://www.samplesite.com/#specific_page

and they would see a flash site that would navigate to the "specific_page." Those without flash would see the "specific_page" rendered in text in the alternative content section.

Basically, I would use php/mysql to create a backend to handle all of this since the swf is also using dynamic data. The question is, does something out there that does this already exist?

Was it helpful?

Solution

There's an inherent problem with what you're trying to achieve.

The URL hash (or anchor) is client-side only - that token is not sent to the server. This means the only way (that I know of) to load the content you need for example.com/#some_page is to use AJAX, which can read the hash and then request the page-specific data from the server.

Done? No. Because this will kill search engine bots. A possible solution is to have example.com/some_page serve the same content (in fact, that could easily be a REST service that you've already made to return the AJAX or Flash-requested content), and provide a sitemap.xml which indexes those URIs to help out the search engines.

I know of no existing framework that does specifically these tasks, although it certainly seems like one could be made w/o too much trouble.

OTHER TIPS

Well, according to OSFlash (the open source flash people) both CakePHP and PHPWCMS can do what you need, although from a first glance at their sites' feature list, it is not entirely obvious.

Let us know if they do work!

if you're using SWFAddress with Flash/Flex then you can read in the URL and then split that into an array and do as you wish:

SWFAddress.addEventListener ( SWFAddressEvent.CHANGE, onChange );
private function onChange ( e : SWFAddressEvent ) : void 
{
     var ar : Array = SWFAddress.getValue ().split ( '/' );
     trace ( 'Array : ', ar );
}

For your non-flash stuff if you're using code igniter you'd be able to pull the url and convert that into an array as well.

Another alternative is to use FAUST. What you can do with FAUST is have PHP render out the HMTL as valid markup then FAUST will pull the HTML and pass that to Flash via Flash Vars as XML. This method makes search engines really really happy ( see http://www.bartoncreek.com ).

So to answer your question there are tools out there that will help you achieve your goals.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top