---
title: "load(_:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/webpage/load(_:)-8wfiq"
---

# load(_:)

Loads the web content that the specified URL references and navigates to that content.

## Declaration

```swift
@discardableResult @MainActor final func load(_ url: URL?) -> some AsyncSequence<WebPage.NavigationEvent, any Error>

```

## Parameters

- `url`: The URL to load. If this is nil, an error will be immediately thrown from the returned sequence.

## Return Value

Return Value An async sequence you use to track the loading progress of the navigation. If the Task enclosing the sequence is cancelled, the page will stop loading all resources.

## Discussion

Discussion Use this method to load a page from a local or network-based URL. For example, you might use this method to navigate to a network-based webpage.

## See Also

### Loading web content

- [load(_:)](webkit/webpage/load(_:)-32ngj.md)
- [load(_:)](webkit/webpage/load(_:)-7kw3h.md)
- [load(_:mimeType:characterEncoding:baseURL:)](webkit/webpage/load(_:mimetype:characterencoding:baseurl:).md)
- [load(html:baseURL:)](webkit/webpage/load(html:baseurl:).md)
- [load(simulatedRequest:responseHTML:)](webkit/webpage/load(simulatedrequest:responsehtml:).md)
- [load(simulatedRequest:response:responseData:)](webkit/webpage/load(simulatedrequest:response:responsedata:).md)
- [isLoading](webkit/webpage/isloading.md)
- [estimatedProgress](webkit/webpage/estimatedprogress.md)
