<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebFrame/load(_:mimeType:textEncodingName:baseURL:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WebFrame(im)loadData:MIMEType:textEncodingName:baseURL:"
  },
  "title" : "load(_:mimeType:textEncodingName:baseURL:)"
}
-->

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

Sets the main page contents, MIME type, content encoding, and base URL.

```
func load(_ data: Data!, mimeType MIMEType: String!, textEncodingName encodingName: String!, baseURL URL: URL!)
```

## Parameters

`data`

The data to use for the main page of the document.

`MIMEType`

The MIME type of the data.

`encodingName`

The IANA encoding name (for example, “utf-8” or “utf-16”).

`URL`

A file that is used to resolve relative URLs within the document.

## Discussion

---

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)