diff --git a/test/jquery_example/public/index.html b/test/jquery_example/public/index.html index 82a23a0..044f0c6 100644 --- a/test/jquery_example/public/index.html +++ b/test/jquery_example/public/index.html @@ -546,9 +546,14 @@

Domain Stats

chunkAttempts++; do { // split individual JSON objects - var nextMessage = response.substring(messageStart); - indexOfBreak = nextMessage.indexOf('\n'); - if (indexOfBreak > 0) { + var nextMessage = ""; + var indexOfBreak = -1; + while(true) { + nextMessage = response.substring(messageStart); + indexOfBreak = nextMessage.indexOf('\n'); + if (indexOfBreak === -1) { + break; + } urlSubstring = nextMessage.substring(0, indexOfBreak); messageStart = messageStart + indexOfBreak + 1;