Fajax -- the fake alternative to ajax

Put these two tags in the head of your html document:

<META http-equiv="Page-Enter" content="blendTrans(Duration=0.2)">
<META http-equiv="Page-Exit" content="blendTrans(Duration=0.2)">

That's it. You've implemented Fajax: the fake alternative to ajax.

The blink that occurs on postback is no longer visible, most of the time.

Okay, it's a dirty nasty trick. Don't flame me, troll me, spam me or DoS me. I feel terrible as i write these words: blendtrans is a Microsoft function. In non-ie browsers it will have no effect.

How does it work?

When a page posts back (for example when you click a button on a form), it normally causes a screen flicker as the page is redrawn. In a lot of cases the screen that is redrawn is very similar to the previous screen, and the flicker is an annoyance, disrupting the user's experience. The Blendtrans function causes the old page to blend smoothly into the new one, rather than flickering.

A lot of the time, this gives an identical effect to an ajax style http request. The page appears to have stood absolutely still as just one part of it is updated.

This simple trick alone gives you about 50% of the benefit of ajax, with a 1% of the effort. Having said that, it's absolutely limited to that one visual benefit, and limited to one browser.

To get the full benefits of ajax, you will of course need to use ajax, not fajax. ;-)

Note that these effects are best not overused.

as seen on the daily grind
 

I'm currently writing a book about how to build your first product. If building a product is something you'd like to do, then sign up to be notified when the book is available.

Your comment, please?

Your Name
Your Url (optional)
Note: I may edit, reuse or delete your comment. Don't be mean.