I'm developing a web page using the hidden frame technique to retrieve some data from the server.
The data is updated in real time, and the server notifies the browser on each modification..
The component is working in both IE and Firefox, but in chrome, the callback function retrieved by the server is not executed in the client browser.
However i can see the connection opened in the developer tools, and the received data through that connection growing.
I have read that some browsers could have problems parsing and executing the data received from the server, but I wasn't able to find a solution for those cases.
Maybe i need to send some http header to this case, but i dont even know what to search.
EDIT: Code sample
This is the function i'm using to connect to the server. It is called after a sign in step. The sign in is implemented in the same way as the connect step.
console.log("__sendConnectRequest: " + err.message);
var __connectResponseCallback = null;
__connectResponseCallback = callback;
This is how i create my DOM elements. This elements are being appended to the body of the document, and the form has some input strings.
function getNewIframe(name, id)
//KNOWN BUG IN IE while creating iframes
iframe = document.createElement('<iframe name="' + name + '">');
iframe = document.createElement('iframe');
iframe.name = name;
iframe.id = id;
iframe.style.display = 'none';
function getNewForm(name, id, target, action)
var form = document.createElement("form");
form.name = name;
form.id = id;
form.method = 'post';
form.target = target;
form.action = serverUrl+action;
form.style.display = 'none';
The solution was solved by adding the
multipart/x-mixed-replace header in the server response. This way, the data is executed in chunks and the browser doesn't need to wait for all the response to be received.
It seems it is an old standard in comet techniques.