為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Developer Tools Shows Wrong Source

  • 2 回覆
  • 3 有這個問題
  • 8 次檢視
  • 最近回覆由 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.