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

搜索 | 用户支持

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

详细了解

Making cookie saving the exception rather than the rule

more options

My current History controls look like this:

       Firefox will:  [Use custom settings for history]
       [ ] Always use private browsing mode
               [x] Remember my browsing and download history
               [x] Remember search and form history
               [x] Accept cookies from sites
                       Accept third-party cookies:  [Always]
                       Keep until:  [I close Firefox]
               [ ] Clear history when Firefox closes

However, I've tried several times to set Exceptions to the rules for cookie handling, and found that they are routinely ignored under these conditions. That is to say, the "Keep until: [I close Firefox]" setting seems to override my Exceptions every time. Is there any way to say e.g., "Keep the cookies from example1.com, samplesite2.com, and third-test.com permanently, but trash all the rest each time I close Firefox"?

My current History controls look like this: Firefox will: [Use custom settings for history] [ ] Always use private browsing mode [x] Remember my browsing and download history [x] Remember search and form history [x] Accept cookies from sites Accept third-party cookies: [Always] Keep until: [I close Firefox] [ ] Clear history when Firefox closes However, I've tried several times to set Exceptions to the rules for cookie handling, and found that they are routinely ignored under these conditions. That is to say, the "Keep until: [I close Firefox]" setting seems to override my Exceptions every time. Is there any way to say e.g., "Keep the cookies from example1.com, samplesite2.com, and third-test.com permanently, but trash all the rest each time I close Firefox"?

由T.BugReporter于修改

所有回复 (2)

more options

You selected 'Keep Until Close Firefox.' Turn this off.

Go to the Mozilla Add-ons Web Page {web link} (There’s a lot of good stuff here) and search for a cookie controller.

more options

It should work -- that's how I roll -- but if you were entering sites manually in the Exceptions dialog, there may be a problem getting the exact syntax Firefox wants.

One easier way is to use the Permissions panel of the Page Info dialog. You can call that up using any of these (while on the site for which you want to create an exception):

  • right-click a blank area of the page and choose View Page Info > Permissions
  • (menu bar) Tools menu > Page Info > Permissions
  • click the padlock or "i" icon to the left of the site address, then the ">" icon, then More Information > Permissions

Scroll down to "Set Cookies" and uncheck the "Use default" box, and then select the Allow permission. This usually will take effect the next time the site sets the cookies, so possibly not until after the next session.

There are a lot of cookie-related add-ons which ease the process of managing your cookie permissions. For example, Cookie Monster (https://addons.mozilla.org/firefox/addon/cookie-monster/). I'm attaching a screenshot of the information you get from its toolbar button. (I have the option to "Apply cookie settings to both HTTP and HTTPS" turned on, which streamlines the menu. With this option you don't have to set/modify permissions for both HTTP or HTTPS on the same site.)