views:

166

answers:

1

On Safari and Chrome, I won't be able to see flush() updates updating live on my page until after a certain number of flushes, or sometimes it hangs altogether on Safari. Flush updates work immediately on firefox though.

I'd like to know a couple things:

1) Why does Safari and Chrome lag out at the beginning with the flush updates, and then all of a sudden works normally later after I spam flushes?

2) Does flush() have a significant server performance gain over using finish() and then re-polling? how much?

A: 

found the answer... Safari and Chrome require extra stuff in the header content before they enter a continues flush stream mode. You can insert junk to ignore in the header and then let it stream.

resopollution
can you explain what you mean by this? what header do you send?
clofresh
you can put whatever you want, it's just useless junk that needs to take up a certain number of bytes. You ignore that part when you parse the stream of course, as it's only purpose is to make Chrome and Safari streams smooth right off the bat.
resopollution