I've been using SWFAddress for a little while (which works great!) and now I'm working on upgrading to version 2. I have 2 questions about the SEO sample, and certain design decisions contained within.
QUESTION 1 --
What does the seo() function in swfaddress-seo.js actually do?
<?php swfaddress_seo(); ?>
QUESTIONS 2 --
In the downloaded seo sample code (div content) links look like this:
<a href="/swfaddress/samples/seo/" onclick="SWFAddress.setValue('/'); this.blur(); return false;">SWFAddress Website</a>
but at http://www.asual.com/swfaddress/samples/seo/ (div content) links look like this:
<a href="/swfaddress/samples/seo/">SWFAddress Website</a>
It seems to me that the setValue() function should only be necessary for ajax implementation, and can be removed from the seo sample?
It uses a synchronous XHR that sends the current path to the server and saves it in a session variable. After the redirect the session variable is used for the generation of proper content and after that it's deleted.
Generally the idea is to have a client-side redirect that produces exactly the same markup as the original page. This is why I call it "non-sneaky redirect" which conforms with the Google guidelines.
You're completely correct. I incidentally copied some of the Ajax code to the SEO sample and it went as a part of the release. The setValue() is not needed for Flash SEO.
Currently I'm working on 2.1 and the SEO part is being improved, especially for cases when Flash Player is not available. You can find the updated files in the SVN.
Thanks for the info.
So as far as the synchronous ajax stuff goes... how was this implemented in version 1.1? Does this code replace some of the .htaccess mod_rewrite stuff?
Also, I am getting some surprising results when looking at the source code of the following urls when they are entered directly into the IE6 address bar... (cleared cache & reloaded browser prior to test)
[ about page displayed ]
[ portfolio page displayed ]
[ portfolio page displayed again! ]
Does this make sense? Is it a documented bug?
In revision 419 (/trunk/swfaddress/samples/seo/index.php) you removed the swfaddress_seo code. Am I looking at the correct file?
Yes, this code is replaced by something new which is called SWFAddressOptimizer. It has a built-in Flash detection, so that Flash websites can gracefully degrade to a working HTML version when needed.
The IE6 issue you're experiencing is caused by the fact the there is an IE check in the PHP code that creates browser caching of the PHP response. It's there to fix the Refresh button in IE which is broken by default with dynamic pages. All this causes the effect you've seen, but only in IE. The new SWFAddressOptimizer ensures that the # redirection and the caching will work only when the Flash version of the site is viewed.
Log in to post a comment.