We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

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

搜索 | 用户支持

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

详细了解

How do I remove cookies in the Developer Edition (42.0a2) if the "cookie" command doesn't get recognized in the command line?

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

more options

I'm using Firefox Developer Edition (42.0a2) for my development work. I dread using the "Web Developer Tools" that it ships with because it's nowhere near as good as Firebug--something I dearly miss and have been considering dropping Dev. Ed. to go back to a version that fully supports Firebug. In spite of this, I'm trying to be patient and stick this out and in so doing, I'd love to know a non-kludge way of removing cookies as easily as you could with Firebug. Is there a simple button that allows you to select the cookie and remove it? Nope. Is there a context menu that gets displayed allowing you to remove it when you right-click on the respective cookie? Nope. There is a command called "cookie" that offers some methods of cookie management, but not surprisingly, when I begin to type the cookie command at the prompt, nothing shows up. When I go ahead and try to enter "cookie list" regardless, it indicates the following error: "SyntaxError: missing ; before statement"

So, long story short, I need to remove some cookies. How do I do this?

I'm using Firefox Developer Edition (42.0a2) for my development work. I dread using the "Web Developer Tools" that it ships with because it's nowhere near as good as Firebug--something I dearly miss and have been considering dropping Dev. Ed. to go back to a version that fully supports Firebug. In spite of this, I'm trying to be patient and stick this out and in so doing, I'd love to know a non-kludge way of removing cookies as easily as you could with Firebug. Is there a simple button that allows you to select the cookie and remove it? Nope. Is there a context menu that gets displayed allowing you to remove it when you right-click on the respective cookie? Nope. There is a command called "cookie" that offers some methods of cookie management, but not surprisingly, when I begin to type the cookie command at the prompt, nothing shows up. When I go ahead and try to enter "cookie list" regardless, it indicates the following error: "SyntaxError: missing ; before statement" So, long story short, I need to remove some cookies. How do I do this?

被采纳的解决方案

On the about:permissions page, a site should eventually appear if Firefox has stored data for it. I don't know of any reason that it would not. But this page might not be fully debugged, that might be why it's a hidden page.

定位到答案原位置 👍 0

所有回复 (5)

more options

I think you're right that the Storage lists (cookies, etc.) in the Web Console are read-only.

The typical ways to remove cookies, available to all end users, are:

  • Cookies dialog
  • Permissions Manager

(1) For the current site's cookies you can use the Security panel of the Page Info dialog. Either:

  • right-click/Ctrl+click a blank area of the page and choose View Page Info > Security > "View Cookies"
  • (menu bar) Tools > Page Info > Security > "View Cookies"
  • click the padlock or globe icon in the address bar > right caret (>) > More Information > "View Cookies"

In the dialog that opens, the site is already pre-filled in the box at the top so you can remove that site's cookies individually.

To see cookies for all sites, clear the filter box at the top.

(2) You can open the classic bookmarks dialog in a tab by pasting the following internal address into the address bar and pressing Enter/Return:

chrome://browser/content/preferences/cookies.xul

If you keep that open in a tab or separate window at all times, you could more easily switch to it when needed. You can bookmark it for future ease of access.

(3) For a global perspective, you could try the Permissions Manager. In a new tab, type or paste about:permissions in the address bar. Again, you can keep this open for quick access.

The left column will start filling with a list of sites for which Firefox has stored cookies, history, custom permissions, etc. You can type part of the site name in the search box above the left column to filter the list. Then click any site and on the right side you'll see how many cookies, the current cookie permission setting, and you can clear cookies if you like.

(4) If you have a wide display, you could put the classic cookie dialog in the sidebar. To set that up, start with #2 above, and bookmark the page. After you create the bookmark, right-click/Ctrl+click it, choose Properties, and check the box in the lower left corner to open it in the sidebar.

That way when you use the bookmark, it will appear next to the page for quick access and you can either keep it open as you browse or close it when you're done. But it is a little cramped if you don't have a wide display.

To request/propose changes to the dev tools, try this page:

https://ffdevtools.uservoice.com/forums/246087-firefox-developer-tools-ideas

more options

jscher2000, your post was tremendously helpful. Thank you so much!

Quick follow-up question: When I go into "about:permissions", I can't find the site that I would like to configure permissions for. Would you happen to have any ideas as to why this is?

And thanks, also, for that link to propose changes. I'll definitely use that.

more options

选择的解决方案

On the about:permissions page, a site should eventually appear if Firefox has stored data for it. I don't know of any reason that it would not. But this page might not be fully debugged, that might be why it's a hidden page.

more options

You need to type such command in the command line of the Developer toolbar (Shift+F2) and not in the command line of the Web Console (Firefox menu button or Tools > Web Developer)

In the Web Console you can use document.cookie

由cor-el于修改

more options

cor-el, thanks for the heads-up about that.

I'd hate to think that this isn't a serious usability issue...