AJAX vs standard Add to Cart

Would anyone be able to tell me what the differences and/or advantages there are to using the AJAX add to cart vs the non-AJAX? We have a new store and had the AJAX switched on. I noticed that when our server is under load or our internet connection slows from time to time that when I click on add to cart it appears that nothing is happening. I do not see the AJAX “loading” message right away. If the delay is long enough, I click on the add button again thinking that perhaps I did not click it properly the first time. Eventually the “Loading” box appears but I discover that all the clicks I made end up being processed and too many items are added to the cart.



I have turned off the AJAX add to cart and from what I can see, everything works exactly the same except I don't get the “Loading” message anymore. If my click is delayed I at least see the “whirly wheel” in the browser tab that shows me at least something is happening and my click is being processed. With AJAX you do not see this and it leads you to think nothing is being processed.



Just wondering which is the better way to go. Right now we are going to run with the non-AJAX because the customer feedback is better.



Henry

If the performance of your environment is varied or at times non-responsive then you should disable as many AJAX type requests as possible.



A normal cs-cart will spawn about 2-6 different cgi processess for EVERY PAGE LOAD to handle the system generated AJAX requests. However, the add to cart button is actually the correct use of AJAX (I.e. it's user initiated). If you have shell access to your server, run this command to see what I mean:

netstat -tp | grep ESTAB

This will show you the established network connections into your server and the process id's and process names associated with them.



But if you're having performance problems then NOT using ajax would be best from a user-feedback standpoint. Nothing worse than taking an action and getting no feedback whatsoever.