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

搜索 | 用户支持

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

详细了解

Cookies not shared with Firefox Dev Tools? Or Firefox Dev Tools needs logging in separately?

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

more options

I am seeing a strange problem which I am not sure the reasons behind. - Cookies? Firefox Dev Tools?

First of all, I have "Never remember history" settings and cookies are not carried forward to my next session.

I am developing a website and some of the pages require log-ins to access. The user sessions are handled with cookies.

For a log-in required page, I log in and everything shows up fine as how it is after I log in. When I press Ctrl-U , I can see the source of that page as expected.

However, when I press F12 to open the Firefox Dev Tools, I click on the Debugger tab and try to see the source code of that logged-in page. All I can see, is the source of the page when I have NOT logged in, i.e. the log-in prompt page.

I wonder if it is because of my "Never remember history" settings which makes the browser console unable to access the cookies required for the session. Or am I not using the Firefox Dev Tools correctly?

I was a FireBug user and I did not have this problem before. I only see this problem after switching to the Firefox Dev Tools.

I am seeing a strange problem which I am not sure the reasons behind. - Cookies? Firefox Dev Tools? First of all, I have "Never remember history" settings and cookies are not carried forward to my next session. I am developing a website and some of the pages require log-ins to access. The user sessions are handled with cookies. For a log-in required page, I log in and everything shows up fine as how it is after I log in. When I press Ctrl-U , I can see the source of that page as expected. However, when I press F12 to open the Firefox Dev Tools, I click on the Debugger tab and try to see the source code of that logged-in page. All I can see, is the source of the page when I have NOT logged in, i.e. the log-in prompt page. I wonder if it is because of my "Never remember history" settings which makes the browser console unable to access the cookies required for the session. Or am I not using the Firefox Dev Tools correctly? I was a FireBug user and I did not have this problem before. I only see this problem after switching to the Firefox Dev Tools.

所有回复 (2)

more options

Seems to working here and no difference between regular mode and private browsing mode. Searching for Logout brings me to the logout button.

Does this also happen if you go to the Inspector tab?

more options

No. The Inspector tab shows the correct HTML of the logged-in page. It's the Debugger tab that has the problem and shows the HTML of log-in prompt page.

Another thing is - I don't know if it is related to this problem - For both logged-in and not-logged-in versions of HTML, I am actually accessing the same URL/address - index.php. I don't know if Firefox Dev Tools has it mixed up.

Basically when I visit index.php , one of two things happens: - if I am not already logged in, the page will show the HTML of the log in prompt - if I am already logged in, the page will show the content of the actual page without prompting to log in.

The log-in is purely done by HTML form, not by AJAX. After server logs user in with the HTML form submission, one of the two, Javascript or server redirection, will be used to refresh the browser to the same URL.

Since both sets of HTML share the URL, I doubt if Debugger tab does not know that the HTML has been updated on second load.