Cookies

来自WordPress中文文档
跳转至: 导航搜索

Cookies are small pieces of textual information stored by webpages on your computer. Their many uses include remembering login information and preserving the contents of your basket on shopping sites.

Cookie permissions

Mozilla Suite and SeaMonkey

Cookie permissions are controlled in "Edit -> Preferences -> Privacy & Security -> Cookies". You can choose to block all cookies, allow all cookies, allow cookies for the originating website only (third-party cookies) or you can allow cookies based on privacy settings. If you allow cookies, you can also select the following retention preferences:

  • Accept cookies normally
  • Accept for current session only (deletes the cookie the next time you exit your browser).
  • Accept cookies for __ days
  • Ask for each cookie (you can limit these warnings by choosing "except for session cookies")

Cookie Manager

The Mozilla Suite/SeaMonkey Cookie Manager (also accessible via "Tools -> Cookie Manager -> Manage Stored Cookies") lets you to view or delete individual cookies ("Stored Cookies" tab) and lets you override basic cookie settings so that you can allow or block cookies for individual sites ("Cookie Sites" tab).

Firefox

Cookie permissions are controlled in "Tools -> Options -> Privacy". (In Firefox 3.5, you must select "Use custom settings for history" in the "Firefox will:" drop-down menu, if another option is shown.) You may choose to accept all cookies that websites wish to set or, in Firefox 3.0 and above, you may choose to accept or block third-party cookies that are often set by other companies who advertise on those sites.

In Firefox 2, the option to block third-party cookies (accept cookies "for the originating site only") was removed from the user interface (UI). [1] Firefox 2 users can still block third-party cookies in about:config, by modifying the preference network.cookie.cookieBehavior to 1. For more information about this setting, see bug 324397 and bug 417800.

Starting in Firefox 3, you can block third-party cookies in the user interface, by deselecting (clearing) the option, "Accept third-party cookies". [2]

Exceptions list

As well as the basic permissions above, you may also make blacklists and whitelists using the Exceptions list. The settings in this list override your basic cookie settings, so that you can have stronger control over individual sites that you have manually added to the list. You can choose to allow an individual site to set cookies, or to set "session" cookies which are deleted once you have closed Firefox, or to stop it from setting cookies at all.

Websites report cookies are disabled

Some websites will not work properly or will display an error message if cookies are disabled. If you have set your Mozilla browser to accept cookies but websites are not allowing you to log in or report that cookies are not enabled, are blocked, or are being rejected by your browser, see if the site is shown as blocked in the Firefox "Exceptions" list (under Tools -> Options -> Privacy") or in the Mozilla Suite/SeaMonkey "Cookie Sites" list (under "Tools -> Cookie Manager -> Manage Stored Cookies") and, if so, remove it from the list. For more information, read Websites report cookies are disabled.

Removing cookies

Mozilla Suite and SeaMonkey

To remove all cookies go to "Edit -> Preferences -> Privacy & Security -> Cookies -> Cookie Manager -> Stored Cookies (tab)" (or use "Tools -> Cookie Manager -> Manage Stored Cookies") and click "Remove All Cookies". To remove specific cookies, select a cookie from the list and click "Remove Cookie".

Firefox

To remove all cookies, go to "Tools -> Options -> Privacy". In Firefox 3.5, select "Use custom settings for history" in the "Firefox will:" drop-down menu, if another option is shown. Select "Show Cookies..." and click "Remove All Cookies". To remove specific cookies, select a cookie from the list, and click "Remove Cookie".

Sometimes removing the cookies in the Cookie Manager is not sufficient and you need to delete the file that stores cookies in your Firefox profile folder ("cookies.sqlite" in Firefox 3 and above, "cookies.txt" in Firefox 2 or below). See the section, Where are cookies stored (below) for more information.

The Torbutton extension interferes with cookie deletion.[3][4]

Where are cookies stored

Cookie information is stored in the profile folder, in two files. Starting with Firefox 3.0 and SeaMonkey 2.0 the cookie information is stored in the files cookies.sqlite and permissions.sqlite. In Firefox 2 or below and Mozilla Suite/SeaMonkey 1.x, cookies are stored in the cookies.txt file and cookie site permissions are stored in the hostperm.1 file.

File Description
cookies.sqlite
cookies.txt
Holds all of your cookies, including login information, session data, and preferences.
permissions.sqlite
hostperm.1
Holds preferences about which sites you allow or prohibit to set cookies, to display images, to open popup windows and to initiate extensions installation.

See also

External links