Sunday, 18 August 2013

Javascript Ajax stops working in Chrome

Javascript Ajax stops working in Chrome

I am breaking my head on an embedded project: Microchip ethernet/ wifi. I
have a webpage where the data is loaded via ajax. Due to size limits, I am
not using jquery, just Javascript AJAX.
PROBLEM: It seems to be all good in firefox. But in Chrome, It starts, and
If I refresh, the AJAX stops working (sometimes, after repeated
refreshes). No error is logged in the console.
I created a stripped down demo on
avarachan.com/test4/ajaxTest.html. It uses just the mchp.js from the
microchip demo. The page loads a number from another page via AJAX. This
is repeated 100 ms, and If I cant get anything in 5 seconds ( ie ~50
attempts), it times out.
To recreate this error, open the demo link in Chrome, and keep refreshing.
I have a time out of 5 seconds. I am using latest version of Chrome.
NOTE: Once it breaks, even if i keep refreshing, it wont work. but if I
close the tab and open a new one, it works.

No comments:

Post a Comment