randominstanceOfLivingThing randominstanceOfLivingThing - 2 years ago 172
HTTP Question

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

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?

Answer Source

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.

Response Data

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

No 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; }
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download