Edit

Share via


SaveCookiesOnExit

Save cookies when Microsoft Edge closes

Supported versions

  • On Windows and macOS since 86 or later

Description

When this policy is enabled, the specified set of cookies is exempt from deletion when the browser closes. This policy is only effective when:

  • The 'Cookies and other site data' toggle is configured in Settings/Privacy and services/Clear browsing data on close or
  • The policy ClearBrowsingDataOnExit is enabled or
  • The policy DefaultCookiesSetting is set to 'Keep cookies for the duration of the session'.

You can define a list of sites, based on URL patterns, that will have their cookies preserved across sessions.

Note: Users can still edit the cookie site list to add or remove URLs. However, they can't remove URLs that have been added by an Admin.

If you enable this policy, the list of cookies won't be cleared when the browser closes.

If you disable or don't configure this policy, the user's personal configuration is used.

Supported features

  • Can be mandatory: Yes
  • Can be recommended: No
  • Dynamic Policy Refresh: No - Requires browser restart
  • Per Profile: Yes
  • Applies to a profile that is signed in with a Microsoft account: Yes

Data type

  • List of strings

Windows information and settings

Group Policy (ADMX) info

  • GP unique name: SaveCookiesOnExit
  • GP name: Save cookies when Microsoft Edge closes
  • GP path (Mandatory): Administrative Templates/Microsoft Edge
  • GP path (Recommended): N/A
  • GP ADMX file name: MSEdge.admx

Example value

https://www.contoso.com
[*.]contoso.edu

Registry settings

  • Path (Mandatory): SOFTWARE\Policies\Microsoft\Edge\SaveCookiesOnExit
  • Path (Recommended): N/A
  • Value name: 1, 2, 3, ...
  • Value type: List of REG_SZ

Example registry value

SOFTWARE\Policies\Microsoft\Edge\SaveCookiesOnExit\1 =

https://www.contoso.com

SOFTWARE\Policies\Microsoft\Edge\SaveCookiesOnExit\2 =

[*.]contoso.edu

Mac information and settings

  • Preference Key name: SaveCookiesOnExit
  • Example value:
<array>
  <string>https://www.contoso.com</string>
  <string>[*.]contoso.edu</string>
</array>

See also