<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKWebpagePreferences",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKWebpagePreferences"
  },
  "title" : "WKWebpagePreferences"
}
-->

# WKWebpagePreferences

An object that specifies the behaviors to use when loading and rendering page content.

```
@MainActor class WKWebpagePreferences
```

## Overview

Create a [`WKWebpagePreferences`](/documentation/WebKit/WKWebpagePreferences) object when you want to change the default rendering behavior of your web view. Typically, iOS devices render web content for a mobile experience, and Mac devices render content for a desktop experience.

## Topics

### Setting the JavaScript preferences

[`allowsContentJavaScript`](/documentation/WebKit/WKWebpagePreferences/allowsContentJavaScript)

A Boolean value that indicates whether JavaScript from web content is allowed to run.

### Setting the preferred content mode

[`preferredContentMode`](/documentation/WebKit/WKWebpagePreferences/preferredContentMode)

The content mode for the web view to use when it loads and renders a webpage.

[`WKWebpagePreferences.ContentMode`](/documentation/WebKit/WKWebpagePreferences/ContentMode)

Constants that indicate how to render web view content.

### Getting Lockdown Mode info

[`isLockdownModeEnabled`](/documentation/WebKit/WKWebpagePreferences/isLockdownModeEnabled)

A Boolean value that indicates whether to use Lockdown Mode in the web view.



---

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)