为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Developer Tools Shows Wrong Source

  • 2 个回答
  • 3 人有此问题
  • 1 次查看
  • 最后回复者为 tbernard

more options

--EDIT-- OK, did some more testing. Looks like my premise was all wrong. It turns out when developer tools goes to load the source in debugger it actually fetches the page again(?). The page in question is a sensitive page so the server redirects back to the previous step on subsequent requests.

I tried checking/unchecking the "Show Original Sources" setting hoping it would prevent the reload and just use what was originally served. Neither worked.

New question - how do I work on the originally served source when I open the debugger tab?

FYI - Firebug seems to be doing what I'm looking for - when I open it's script tab I get the source of the page I'm looking at, not the redirected result.

--ORIGINAL QUESTION-- I'm debugging a site using the built-in developer tools. The Debugger tab is showing the source for the wrong page. It seems to be cached somewhere deep down in the program. How do I correct this?

What I've tried:

- Closed developer tools
- Closed Browser
- Ran CCleaner to clean browser cache et al
- Reopened browser
- Navigated to suspect page and opened developer tools (It pretended like it was reloading source)
- Source still wrong!?!

Is there a way to flush the cache that the developer tools uses?

To show what I'm talking about I've attached screenshots of a few lines of the developer tools debug tab and the the output of 'view source' for the exact same page.

--EDIT-- OK, did some more testing. Looks like my premise was all wrong. It turns out when developer tools goes to load the source in debugger it actually fetches the page again(?). The page in question is a sensitive page so the server redirects back to the previous step on subsequent requests. I tried checking/unchecking the "Show Original Sources" setting hoping it would prevent the reload and just use what was originally served. Neither worked. New question - how do I work on the originally served source when I open the debugger tab? FYI - Firebug seems to be doing what I'm looking for - when I open it's script tab I get the source of the page I'm looking at, not the redirected result. --ORIGINAL QUESTION-- I'm debugging a site using the built-in developer tools. The Debugger tab is showing the source for the wrong page. It seems to be cached somewhere deep down in the program. How do I correct this? What I've tried: - Closed developer tools - Closed Browser - Ran CCleaner to clean browser cache et al - Reopened browser - Navigated to suspect page and opened developer tools (It pretended like it was reloading source) - Source still wrong!?! Is there a way to flush the cache that the developer tools uses? To show what I'm talking about I've attached screenshots of a few lines of the developer tools debug tab and the the output of 'view source' for the exact same page.
已附加屏幕截图

由tbernard于修改

所有回复 (2)

more options

You can remove all data stored in Firefox from a specific domain via "Forget About This Site" in the right-click context menu of an history entry ("History > Show All History" or "View > Sidebar > History") or via the about:permissions page.

Using "Forget About This Site" will remove all data stored in Firefox from that domain like bookmarks, cookies, passwords, cache, history, and exceptions, so be cautious. If you have a password or other data from that domain that you do not want to lose then make sure to backup this data or make a note.

You can't recover from this 'forget' unless you have a backup of the involved files.

If you revisit a 'forgotten' website then data from that website will be saved once again.

more options

Thanks cor-el. That's a useful feature I never knew about.

Unfortunately it didn't solve the problem. As I did more testing I realized my original assumptions may have been wrong. The question has been edited accordingly.