weixin_33693070 2013-01-23 09:16 采纳率: 0%
浏览 28

Node.js块响应

I have unpleasant situation when one of my "long" response in some way blocks another AJAX requests. I call simultaneously 3 different resources:

var list = ['/api/filters','/api/criteria/brands','/api/criteria/genders']  
list.forEach(function(item){$.post(item)})

On server side I could see the following times in logfile:

GET /api/filters 304 51ms
GET /api/criteria/genders 200 1ms
GET /api/criteria/brands 200 0ms

Thats look cool for me, but in browser the picture is absolutely different.

picture with google chrome network tab

So it looks like browser wait for answer on first ( long request ) and only afterwards receive last 2 results.

What could be the reason for this behavior?

  • 写回答

2条回答 默认 最新

  • 斗士狗 2013-01-23 09:20
    关注

    Every browser just handles a specific amount of simultaneous requests at a time. If you fire 10 ajax requests at the same time, the browser put them on a stack and handles one after the other.

    You can find more information about the concurrent requests (because that includes images, javascript, etc as well) in browsern in this question.

    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器