---
title: "webView(_:resource:didReceive:from:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/webresourceloaddelegate/webview(_:resource:didreceive:from:)-22bdg"
---

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

Invoked after a resource has been loaded.

## Declaration

```swift
optional func webView(_ sender: WebView!, resource identifier: Any!, didReceive response: URLResponse!, 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.
- `response`: The reply that was received.
- `dataSource`: The data source for this web view.

## Discussion

Discussion In some rare cases, multiple responses may be received for a single resource. This happens in the case of multipart/x-mixed-replace, also known as a server push. In this case, delegates should assume that the progress of loading this resource restarts, and the expected content length may change.

## See Also

### Loading Content

- [webView(_:resource:willSend:redirectResponse:from:)](webkit/webresourceloaddelegate/webview(_:resource:willsend:redirectresponse:from:).md)
- [webView(_:resource:didFinishLoadingFrom:)](webkit/webresourceloaddelegate/webview(_:resource:didfinishloadingfrom:).md)
- [webView(_:resource:didReceiveContentLength:from:)](webkit/webresourceloaddelegate/webview(_:resource:didreceivecontentlength:from:).md)
- [webView(_:resource:didFailLoadingWithError:from:)](webkit/webresourceloaddelegate/webview(_:resource:didfailloadingwitherror:from:).md)
- [webView(_:plugInFailedWithError:dataSource:)](webkit/webresourceloaddelegate/webview(_:pluginfailedwitherror:datasource:).md)
