<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebPage/load(_:mimeType:characterEncoding:baseURL:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "s:6WebKit0A4PageC4load_8mimeType17characterEncoding7baseURLQr10Foundation4DataV_S2SAHE0H0VAH0J0VtF"
  },
  "title" : "load(_:mimeType:characterEncoding:baseURL:)"
}
-->

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

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

```
@discardableResult @MainActor final func load(_ data: Data, mimeType: String, characterEncoding: String.Encoding, baseURL: URL) -> some AsyncSequence<WebPage.NavigationEvent, any Error>
```

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

`characterEncoding`

The data’s character encoding.

`baseURL`

A URL that you use to resolve relative URLs within the document.

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

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)