Quick Transitions
From Facebook Developer Wiki
This is a beta feature. If you experience any issues using it, please file a bug.
Quick transitions is a feature that improves your application's performance. It uses Ajax to load your canvas pages quickly without reloading the surrounding Facebook frame, which contains all the standard Facebook features like Chat, Search, and the navigation toolbar at the top of every profile.
To enable quick transitions, go to the Canvas tab of the application settings editor and click On for Quick Transitions, then save your change.
Both FBML and IFrame applications can use this feature.
For FBML applications, you don't have to do anything else; your canvas pages should load more quickly.
IFrame applications need to make a choice before you enable this feature:
- If your application uses
<a target="_parent" href="{href}"/>for page transitions, you can replace the target attribute with an onclick event, as in:
- <a onclick="FB.Iframe.goURI({href})" />
- This has the same effect without causing a page load. If you don't use target="_parent" or your application is written in Flash, you can use live event handlers instead, like with JQuery, as your application probably isn't incurring any page loads.
- You can use iframe URLs to supply Facebook with the URL for each new canvas page.
Gotchas
- When using quick transitions, the rules for valid HTML are slightly stricter. For instance, you should make sure that your tables are formatted in the correct order (table -> tr -> td).
- Avoid reflexively modifying event handlers. For instance, if you are within an onclick handler do not add another onclick handle to that same element. It could have unexpected semantics.
