最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

What does "Content unavailable. Resource was not cached" mean in the Chrome DevTools? - Stack Overflow

programmeradmin3浏览0评论

I was trying to fix an error on my website in Google Chrome. To view the source of the bug, I clicked on the reference in the Chrome DevTools console. However, the "Source" tab in the developer tools showed the message "Content unavailable. Resource not cached".

Step by step:

I clicked on the reference to the error location in the DevTools console ... then I saw this in the Source tab:

Questions

  1. What does this error mean? When does it occur?
  2. How can I still see the source to see the location of the error?

I was trying to fix an error on my website in Google Chrome. To view the source of the bug, I clicked on the reference in the Chrome DevTools console. However, the "Source" tab in the developer tools showed the message "Content unavailable. Resource not cached".

Step by step:

I clicked on the reference to the error location in the DevTools console ... then I saw this in the Source tab:

Questions

  1. What does this error mean? When does it occur?
  2. How can I still see the source to see the location of the error?
Share Improve this question asked Feb 7 at 16:12 palschpalsch 7,0064 gold badges25 silver badges35 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

When does this error occur?

You get this error when you

  1. Open a website with the DevTools closed
  2. The website redirects you to another place (!)
  3. The website you were redirected to throws a JS error from JS code that is inlined in the HTML of the page
  4. Then, you open the DevTools and view the source

You can reproduce it using this issue report in the Chromium bug tracker.

Video: https://issues.chromium.org/action/issues/365405774/attachments/59254646?download=true

What does it mean?

  • It's a direct result of the change in Chromium that was added in response to this issue. Previously, the Source tab was just empty.
  • The problem seems to be that the DevTools cannot access the web page cache of the page you visited when there was a redirect.

How to still see the source?

There seems to be no satisfying way. Workarounds include:

  • You can refresh the page and hope that you can reproduce the error.
  • You can view the source of the page (Ctrl/Cmd + Alt/Opt + U or Right Click -> View Source on the page) and manually find the line of the error.

I really hope that there will be a more satisfying solution than the slightly better error message introduced in this commit to Chromium. The issue is really rare, but when it happens it is quite annoying that you cannot see the source of your JS errors.

发布评论

评论列表(0)

  1. 暂无评论