Archive for March, 2006

Ajax tip of the day - Concurrent Connections

Concurrent Connections with Ajax

Here is an quick example of an ajaxed application - you have your main page (lets say index.htm) and when it loads it calls in various content using ajax (lets say we call in navigation.php, products.php and basket.php). Ok so navigation.php, and products.php load fine but basket.php fails!! Hmmm, what a pain - why did it fail to load you ask. Simple!! most browsers can only handle 2 ajax calls at one time and because all 3 of them are called on the index.htm page load - then one probably will fail.

Ok, so how do we get around this limitation? well one way I’ve found that works pretty well is to put delay in the ajax calls ” window.setTimeout(”ajaxcall()”, 400); ” for example. You could have this in the <body onload=”"> tag or just simply enter the javascript at the end of the page (body onload would probably be the best option).

I’d be interested to hear other possible solutions.

Comments

Round-up of 30 AJAX Tutorials

Max Kiesler has created a list of 30 Ajax Tutorials covering various common usages.
Tutorials cover:

Ajax Client-Server Communication
Ajax Drag and Drop
Ajax Forms
Ajax File Uploader
Ajax Framework and Toolkit
Ajax Getting Started
Ajax Image Gallery
Ajax Keyword Suggest
Ajax Live Search
Ajax Sorting
Ajax Tabbed Pages

Although not all of these actually use Ajax (only javascript) - they are still worth a look at. Ajax is a bit of a buzz word these days - so you’ll find many new JavaScript tutorials are masked as being Ajax (which is asynchronous, where many will be strictly client-side). There are great benifits with Ajax, but many things can be done without it!

Comments

Ajax Toybox

You may be interested in some example ajax code posted over on funwithjustin. He has some nice simple examples which are available as demos on his site and also available for download.

The Ajax Toybox

Nice One!!

Comments

« Previous entries ·