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

# webView(_:resource:didReceiveContentLength:from:)

Invoked when some of the data for a given resource has arrived.

```
optional func webView(_ sender: WebView!, resource identifier: Any!, didReceiveContentLength length: Int, from dataSource: WebDataSource!)
```

## Parameters

`sender`

The web view that sent this message.

`identifier`

An identifier object used to track the resource being loaded by `dataSource`.

`length`

The amount of incremental data received for this resource—the amount of data loaded since the last time this method was invoked for this resource, not the total amount received for this resource.

    The     `length`     parameter type was changed from type     `unsigned int`     to type     `NSUInteger`     in OS X v10.5.

`dataSource`

The data source for this web view.

## Discussion

Delegates might implement this method to update the load status of an individual resource.

---

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)