---
title: "load(_:mimeType:characterEncodingName:baseURL:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/wkwebview/load(_:mimetype:characterencodingname:baseurl:)"
---

# load(_:mimeType:characterEncodingName:baseURL:)

Loads the content of the specified data object and navigates to it.

## Declaration

```swift
func load(_ data: Data, mimeType MIMEType: String, characterEncodingName: String, baseURL: URL) -> WKNavigation?
```

## Parameters

- `data`: The data to use as the contents of the webpage.
- `MIMEType`: The MIME type of the information in the data parameter. This parameter must not contain an empty string.
- `characterEncodingName`: The data’s character encoding name.
- `baseURL`: A URL that you use to resolve relative URLs within the document.

## Return Value

Return Value A new navigation object for tracking the request.

## Discussion

Discussion Use this method to navigate to a webpage that you loaded yourself and saved in a data object. For example, if you previously wrote HTML content to a data object, use this method to navigate to that content.

## See Also

### Loading web content

- [loadHTMLString(_:baseURL:)](webkit/wkwebview/loadhtmlstring(_:baseurl:).md)
- [loadFileRequest(_:allowingReadAccessTo:)](webkit/wkwebview/loadfilerequest(_:allowingreadaccessto:).md)
- [loadFileURL(_:allowingReadAccessTo:)](webkit/wkwebview/loadfileurl(_:allowingreadaccessto:).md)
- [loadSimulatedRequest(_:response:responseData:)](webkit/wkwebview/loadsimulatedrequest(_:response:responsedata:).md)
- [loadSimulatedRequest(_:responseHTML:)](webkit/wkwebview/loadsimulatedrequest(_:responsehtml:).md)
- [isLoading](webkit/wkwebview/isloading.md)
- [estimatedProgress](webkit/wkwebview/estimatedprogress.md)
