Contents

WKHTTPCookieStore

An object that manages the HTTP cookies associated with a particular web view.

Declaration

@MainActor class WKHTTPCookieStore

Overview

Use a WKHTTPCookieStore to specify the initial cookies for your webpages, and to manage cookies for your web content. For example, you might use this object to delete the cookie for the current session when the user logs out. To detect when the webpage changes a cookie, install a cookie observer using the add(_:) method.

You don’t create a WKHTTPCookieStore object directly. Instead, retrieve this object from the WKWebsiteDataStore object in your web view’s configuration object.

Topics

Managing cookies

Permitting cookie storage

Observing cookie store changes

Instance Methods

See Also

Web data management