---
title: "clearWebsiteData(completionHandler:)"
framework: safariservices
role: symbol
role_heading: Instance Method
path: "safariservices/sfsafariviewcontroller/datastore/clearwebsitedata(completionhandler:)"
---

# clearWebsiteData(completionHandler:)

## Declaration

```swift
func clearWebsiteData(completionHandler completion: (@Sendable () -> Void)? = nil)
```

```swift
func clearWebsiteData() async
```

## Discussion

Discussion important: You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration: func clearWebsiteData() async For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously.
