Chrome开发工具无法显示响应,即使返回的内容为头Content-Type:text / html;字符集= UTF-8 [英] Chrome dev tools fails to show response even the content returned has header Content-Type:text/html; charset=UTF-8

查看:1461
本文介绍了Chrome开发工具无法显示响应,即使返回的内容为头Content-Type:text / html;字符集= UTF-8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么当返回的内容是text / html类型时,我的Chrome开发人员工具显示无法显示响应数据?



请参阅开发人员工具中的返回响应?

解决方案

我认为这只会在您选中保留日志在导航离开后查看先前请求的响应数据。



例如,我查看了Response来加载这个Stack Overflow问题。你可以看到它。





第二次,我重新加载这个页面,但没有看标题或回应。我导航到一个不同的网站。现在,当我查看响应时,它显示'无法加载响应数据'。



这是已知的问题 ,这已经有一段时间了,并且有很多争论。但是,有一种解决方法,您可以在 onunload 上暂停,以便在导航离开之前查看响应,从而在导航离开时不会丢失数据。

  window.onunload = function(){debugger; } 


Why does my chrome developer tools show "Failed to show response data" in response when the content returned is of type text/html?

What is the alternative to see the returned response in developer tools?

解决方案

I think this only happens when you have 'Preserve log' checked and you are trying to view the response data of a previous request after you have navigated away.

For example, I viewed the Response to loading this Stack Overflow question. You can see it.

The second time, I reloaded this page but didn't look at the Headers or Response. I navigated to a different website. Now when I look at the response, it shows 'Failed to load response data'.

This is a known issue, that's been around for a while, and debated a lot. However, there is a workaround, in which you pause on onunload, so you can view the response before it navigates away, and thereby doesn't lose the data upon navigating away.

window.onunload = function() { debugger; }

这篇关于Chrome开发工具无法显示响应,即使返回的内容为头Content-Type:text / html;字符集= UTF-8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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