Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
451 views
in Technique[技术] by (71.8m points)

ruby on rails - net::ERR_INCOMPLETE_CHUNKED_ENCODING in Chrome only

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

net::ERR_INCOMPLETE_CHUNKED_ENCODING 

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).

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

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

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.

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...