开发者

Tornado streaming: flush() lagging on Safari & Chrome (Firefox is fine)

开发者 https://www.devze.com 2022-12-21 19:43 出处:网络
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 immediatel

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, 开发者_如何学Pythonand 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号