OK, But right now we are using hidden iFrame to implement the COMET. And we are facing the memory problems with the iFrame as it keeps on getting the JS from server and after running the browser say continuously for 2 days causes the browser to crash.
I hope this kind of problem we won't face by using the XHR with Web Workers?
Joined: Jul 27, 2010
It sounds like you might have a memory leak...
So first I would check the current state of your web app by using Chrome devtools audit tab (or firebug similar option).
Then, you can take your current code that using COMET (on top of XHR) and port it into a worker. You should be fine with it running inside the worker for long-long time.
BTW, it might be good idea to write a 'unit test' that take just the code you wish to run in the worker and test it first on a regular page.