问题:firefox的网络行为中出现NS_BINDING_ABORTED错误如下:
回答:NS_BINDING_ABORTED
firefox的tcp等待队列max是6,这里以因为并发太多,不再能进入等待队列了,而引起初始化错误,
(
queue max 6参考: https://docs.diffusiondata.com/cloud/latest/manual/html/designguide/solution/support/connection_limitations.html
阻塞的含义参考:https://firefox-source-docs.mozilla.org/devtools-user/network_monitor/request_details/#network-monitor-request-details-timings-tab
为Blocked --
Time spent in a queue waiting for a network connection.
The browser imposes a limit on the number of simultaneous connections that can be made to a single server. In Firefox this defaults to 6, but can be changed using the network.http.max-persistent-connections-per-server preference. If all connections are in use, the browser can’t download more resources until a connection is released.
----
其中network.htt[.max-persistent-connections-per-server 定义参考:https://kb.mozillazine.org/Network.http.max-persistent-connections-per-server
----------------
对比参考chrome的queue和stalled:https://developer.chrome.com/docs/devtools/network/reference/?utm_source=devtools#timing-explanation
Queueing. The browser queues requests when:
There are higher priority requests.
There are already six TCP connections open for this origin, which is the limit. Applies to HTTP/1.0 and HTTP/1.1 only.
The browser is briefly allocating space in the disk cache
Stalled. The request could be stalled for any of the reasons described in Queueing.
)
而之前的status:0的原因就解释通了
XmlHttpRequest对象尚未初始化 ,参考:https://blog.csdn.net/weixin_34408717/article/details/90165738 和 https://www.publiccms.com/question/2020/03-26/509.html ;
0 Uninitialized 初始化状态。XMLHttpRequest 对象已创建或已被 abort() 方法重置。
而没有初始化就是应为连queue都无法进入,没有资源可以初始化了。
此问题从本质上分析应该是前端的这样的请求下对终端浏览器使用估计不充分引起的,可能是服务器之前的返回不够快,也可能是前端并发请求的策略过多没有做容长时间/少资源的结果。