net::ERR_INCOMPLETE_CHUNKED_ENCODING 仅在 Chrome 中 [英] net::ERR_INCOMPLETE_CHUNKED_ENCODING in Chrome only

查看:28
本文介绍了net::ERR_INCOMPLETE_CHUNKED_ENCODING 仅在 Chrome 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在加载某些页面时遇到此错误:

I've been getting this error when loading certain pages:

net::ERR_INCOMPLETE_CHUNKED_ENCODING 

这些页面没有做任何特别的事情,而且似乎所有内容都可以在其他浏览器中运行.发生这种情况的页面以 JSON 格式显示数据.它仅在 JSON 页面必须显示大量项目时发生.rails 控制台未显示任何错误(200 响应).

These pages don't do anything special and everything seems to work in other browsers. The pages that this happens on display data in JSON. It only happens when the JSON page has to display a large amount of items. The rails console is not displaying any errors (200 response).

推荐答案

我昨天遇到了这个问题.这是因为服务器没有响应某些资源.

I have met this problem yesterday. It's because of the server didn't response some resources.

在我的页面中,我有一些大文件链接,例如<a href="/file_path">file_name</a>,而这仅发生在 chrome 中.

In my page, i have some large file links like<a href="/file_path">file_name</a>, and this happend only in chrome.

一段时间后,我意识到这可能是由 chrome 的预测网络操作以提高页面加载性能"功能引起的.所以我在 chrome://settings 中关闭了此功能,然后再试一次.正如预期的那样,错误没有再次发生.

In a while ,I recognized this maybe caused by the chrome's 'Predict network actions to improve page load performance' feature.So I turned off this feature in chrome://settings and try it again. As expected, the error didn't occur again.

在那之后,我用full_url_path而不是relative_path更改了资源链接(在rails中,使用resource_url而不是resource_path),然后我不必关闭chrome的功能.而且看起来不错.

After that, I changed resource links with full_url_path instead of relative_path(in rails, use resource_url instead of resource_path), then I didn't have to turn off the chrome's feature. And it looks good.

这篇关于net::ERR_INCOMPLETE_CHUNKED_ENCODING 仅在 Chrome 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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