i try data string xmlhttprequest microcontroller. request works internet explorer, firefox, chrome , opera without errors in browser konsole. safari makes problems error "failed load resource: network connection lost." microcontroller answers data sting (5 bytes).
function httpgetfreq(){ var xmlhttp = new xmlhttprequest(); xmlhttp.onreadystatechange = function() { if (xmlhttp.readystate == 4 && xmlhttp.status == 200){ freq = parsefloat(xmlhttp.responsetext) / 1000; animate (); } } xmlhttp.overridemimetype('text/plain'); xmlhttp.open("get", "frequenz", true); xmlhttp.send(null); }
"failed load resource: network connection lost" might due 1 of following reasons.
xhr requests page content-length > actual content length in case safari: waits until timeout, error event, "failed load resource: network connection lost." in console
xhr requests page content-length > actual content length ending in abrupt server termination safari: error event, "failed load resource: network connection lost." in console
so probable reason might content length mismatch, please check in wire-shark if content length recieved , sent equal or if packet missing
Comments
Post a Comment