Chrome加载第一个AJAX响应很慢 [英] Chrome is slow to load first AJAX response

查看:145
本文介绍了Chrome加载第一个AJAX响应很慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用React和Flux构建应用程序。单击项目列表会启动一个操作,然后使用 axios 启动(通过效果)AJAX请求(尽管我已尝试 superagent-bluebird-承诺具有相同的结果。)

I am building an application using React and Flux. Clicking in a list of items initiates an action which then starts (via an effect) an AJAX request using axios (though I have tried superagent-bluebird-promise with the same results).

问题在于,使用Google Chrome时,首次提出此请求时,会有大约两个延迟单击列表中的项目和正在启动的AJAX请求之间的秒数。随后的点击立即开始加载请求。

The issue is that using Google Chrome, when first making this request, there is a delay of approximately two seconds between clicking the item in the list and the AJAX request being initiated. Subsequent clicks instantly start loading the request.

使用Firefox,所有请求都是即时的。

Using Firefox, all requests are instantaneous.

编辑:我有在两台Ubuntu PC上测试,可以复制相同的症状。我也可以在Android上复制症状,延迟时间更长(约4秒)。

I have tested on two Ubuntu PCs, and can replicate the same symptoms. I can also replicate the symptoms on my Android, with a bigger delay (about 4 seconds).

以下是在Chrome下制作的个人资料的屏幕截图:

Here is a screenshot of a profile made under Chrome:

这是Chrome的错误,还是什么?

Is this a bug with Chrome, or what?

推荐答案

这是Chrome的一个错误。

It is a bug with Chrome.

项目我写作有一些代码(或多或少)直接从我以前的(未完成的)项目中复制过来。

The project I'm writing has some code which is (more or less) directly copied from a previous (unfinished) project of mine.

再次运行旧项目,我遇到了同样的问题Chrome问题。它在我工作之前从未发生过(几个月前)。

Running the old project again, I encounter the same issue with Chrome. It never occurred before when I was working on it (a few months ago).

这篇关于Chrome加载第一个AJAX响应很慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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