对同一 URL 的多个 Ajax 请求 [英] Multiple Ajax requests for same URL

查看:26
本文介绍了对同一 URL 的多个 Ajax 请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我多次对同一个 URL 进行异步调用,但响应是按顺序来的.请参阅附图,请求仅在第一个请求完成后才开始,后续请求也会发生相同的情况.

I make asynchronous call for same URL for multiple times, But the response came as sequentially. Please see the attached image, The request has been started only after first request completes, the same happening for subsquent requests.

但如果 URL 不同,则响应不是顺序的.请确认我是否正在请求一个 URL,firefox 不会对同一 URL 发出另一个请求吗?

But If the URL is different the responses are not sequential. Please confirm me if one URL is being requested, wouldn't firefox make another request for same URL?

推荐答案

Necko 的缓存每个缓存条目只能处理一个写入器.因此,如果您对同一个 URL 发出多个请求,第一个将打开缓存条目以进行写入,而后面的将阻塞在打开的缓存条目上,直到第一个完成.正在努力重新构建缓存以消除此限制.

Necko's cache can only handle one writer per cache entry. So if you make multiple requests for the same URL, the first one will open the cache entry for writing and the later ones will block on the cache entry open until the first one finishes. There's work ongoing to rearchitect the cache to remove this restriction.

这篇关于对同一 URL 的多个 Ajax 请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆