---
title: "delete(_:completionHandler:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/wkhttpcookiestore/delete(_:completionhandler:)"
---

# delete(_:completionHandler:)

Deletes the specified cookie.

## Declaration

```swift
func delete(_ cookie: HTTPCookie, completionHandler: (@MainActor @Sendable () -> Void)? = nil)
```

```swift
func deleteCookie(_ cookie: HTTPCookie) async
```

## Parameters

- `cookie`: The cookie to delete.
- `completionHandler`: A completion handler block to execute asynchronously after the method successfully deletes the cookie. This block has no return value and no parameters.

## See Also

### Managing cookies

- [getAllCookies(_:)](webkit/wkhttpcookiestore/getallcookies(_:).md)
- [setCookie(_:completionHandler:)](webkit/wkhttpcookiestore/setcookie(_:completionhandler:).md)
