<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebFrameLoadDelegate/webView(_:didCancelClientRedirectFor:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WebFrameLoadDelegate(im)webView:didCancelClientRedirectForFrame:"
  },
  "title" : "webView(_:didCancelClientRedirectFor:)"
}
-->

# webView(_:didCancelClientRedirectFor:)

Called when a client redirect is cancelled.

```
optional func webView(_ sender: WebView!, didCancelClientRedirectFor frame: WebFrame!)
```

## Parameters

`sender`

The web view containing the frame.

`frame`

The frame being loaded.

## Discussion

This might happen if a frame changes locations before a pending client redirect is fired. The client redirect occurred in `frame`.

---

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)