Chrome dev tools fails to show response even the content returned has header Content-Type:text/html; charset=UTF-8

后端 未结 9 1111
轮回少年
轮回少年 2020-12-12 11:25

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 t

9条回答
  •  离开以前
    2020-12-12 12:00

    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; }
    

提交回复
热议问题