<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKNavigationDelegate/webView(_:decidePolicyFor:decisionHandler:)-19mn2",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WKNavigationDelegate(im)webView:decidePolicyForNavigationResponse:decisionHandler:"
  },
  "title" : "webView(_:decidePolicyFor:decisionHandler:)"
}
-->

# webView(_:decidePolicyFor:decisionHandler:)

Asks the delegate for permission to navigate to new content after the response to the navigation request is known.

```
optional func webView(_ webView: WKWebView, decidePolicyFor navigationResponse: WKNavigationResponse, decisionHandler: @escaping @MainActor @Sendable (WKNavigationResponsePolicy) -> Void)
```

## Parameters

`webView`

The web view from which the navigation request began.

`navigationResponse`

Descriptive information about the navigation response.

`decisionHandler`

A completion handler block to call with the results about whether to allow or cancel the navigation. This handler has no return value and takes the following parameter:

- policy: A constant that indicates whether to cancel or allow the navigation. For a list of possible values, see [`WKNavigationResponsePolicy`](/documentation/WebKit/WKNavigationResponsePolicy).

## Discussion

Use this method to allow or deny a navigation request after the web view receives the response to its original URL request. The `navigationResponse` parameter contains the details of the response, including the type of data that the response contains. If you implement this method, always execute the `decisionHandler` block at some point. You may execute it synchronously from your delegate method’s implementation, or execute it asynchronously after your method returns.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)