Tuesday, 28 October 2014

Chrome vs Firefox with jQuery AJAX async parameter set to false

We had a button and upon click on it, we display a progress image, send three AJAX requests using jQuery and async set to false and we once all requests are complete, we hide the progress image.

We noticed a strange behaviour when comparing Chrome vs Firefox. On Firefox, the browser responsiveness is normal, it displays the progress image and things execute as designed, while on Chrome, it stops responding for around a second, suddenly progress image shows up and disappears again right away as if all actions took place suddenly.

Changing async parameter to true, made Chrome to behave normally again and in a way similar to Firefox. We didn't reach a clear explanation for why this happens on Chrome but seems it causes some sort of threading issue.

No comments:

Post a Comment