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

# webView(_:identifierForInitialRequest:from:)

Returns an identifier object used to track the progress of loading a single resource.

```
optional func webView(_ sender: WebView!, identifierForInitialRequest request: URLRequest!, from dataSource: WebDataSource!) -> Any!
```

## Parameters

`sender`

The web view that sent this message.

`request`

The request that initiated this load for `dataSource`.

`dataSource`

The data source for this web view.

## Return Value

An identifier object that is retained by `sender` and passed as a parameter to all other delegate messages pertaining to this resource.

## Discussion

Delegates might implement this method to begin tracking the progress of loading an individual resource. Note that this method is invoked once per load where as the [`webView(_:resource:willSend:redirectResponse:from:)`](/documentation/WebKit/WebResourceLoadDelegate/webView(_:resource:willSend:redirectResponse:from:)) method may be invoked multiple times.

## See Also

  [WebKit Objective-C Programming Guide](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/DisplayWebContent/DisplayWebContent.html#//apple_ref/doc/uid/10000164i)



---

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)