<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKWebView/load(_:mimeType:characterEncodingName:baseURL:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKWebView(im)loadData:MIMEType:characterEncodingName:baseURL:"
  },
  "title" : "load(_:mimeType:characterEncodingName:baseURL:)"
}
-->

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

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

```
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

A new navigation object for tracking the request.

## 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.

---

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)