发现谷歌浏览器即使pushlet前端传参使用长链接 stream 模式,但还是实际上效果还是长轮询模式,但ie、火狐上都是正常的长链接模式 然后在pushlet.properties 中有这样两个配置
# You may force all clients to use pull mode
# for scalability
listen.force.pull.all=false
#
# Comma-separated list of User Agent substrings.
# Force these browsers to use pull mode, since they
# don't support JS streaming, matching is done using
# String.indexOf() with lowercased agent strings
# use multiple criteria with &.
#
listen.force.pull.agents=safari
listen.force.pull.all是强制所有浏览器使用pull模式,这里需要设为false(默认false)
listen.force.pull.agents浏览器标志中带这个参数(不区分大小写)的强制使用pull模式,改成无,这样在google浏览器上也能使用长链接模式了。
listen.force.pull.agents=无