>On 8/8/07, John Resig <[EMAIL PROTECTED]> wrote: > > Hey everyone - > > So Mike Hostetler was telling me about some Ajax queueing plugins that > he wanted to write - so I got some ideas, and less than an hour later > - here are two new Ajax queueing plugins for you to enjoy! > > Lame demo: > http://dev.jquery.com/~john/plugins/ajaxqueue/ > > About the plugins: > > * Queued Ajax requests. A new Ajax request won't be started until the > previous queued request has finished. > > Example: > jQuery.ajaxQueue({ > url: "test.php", > success: function(html){ jQuery("ul").append(html); } > }); > > * Synced Ajax requests. The Ajax request will happen as soon as you > call this method, but the callbacks (success/error/complete) won't > fire until all previous synced requests have been completed. > > Example: > jQuery.ajaxSync({ > url: "test.php", > success: function(html){ > jQuery("ul").append("<b>"+html+"</b>"); } > }); > > Both have their uses, but ajaxSync, in particular, seems quite useful. > Let me know what you think. If this code helps you out, let me know, > and I'll throw it up somewhere. > > --John >
Hi John, This surely will be useful. I've been looking for ajax queue functionality for a while but you make it simple :D A study case where the ajax queue will be very useful is if someone is connected to the internet behind proxy which needs authentication. If the proxy requires user to re-authenticate after a certain period of idle time, without ajax request queue, a lot of authentication windows will appear because each request needs its own proxy authentication. With queue approach, only one window will appear and it will wait until user properly authenticates himself. Thanks for the great idea and the great plugin. Regards, Mike

