---
title: WKWebpagePreferences
framework: webkit
role: symbol
role_heading: Class
path: webkit/wkwebpagepreferences
---

# WKWebpagePreferences

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

## Declaration

```swift
@MainActor class WKWebpagePreferences
```

## Overview

Overview Create a 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](webkit/wkwebpagepreferences/allowscontentjavascript.md)

### Setting the preferred content mode

- [preferredContentMode](webkit/wkwebpagepreferences/preferredcontentmode.md)
- [WKWebpagePreferences.ContentMode](webkit/wkwebpagepreferences/contentmode.md)

### Getting Lockdown Mode info

- [isLockdownModeEnabled](webkit/wkwebpagepreferences/islockdownmodeenabled.md)

### Instance Properties

- [allowsJSHandleCreationInPageWorld](webkit/wkwebpagepreferences/allowsjshandlecreationinpageworld.md)
- [alternateRequest](webkit/wkwebpagepreferences/alternaterequest.md)
- [overrideReferrer](webkit/wkwebpagepreferences/overridereferrer.md)
- [preferredHTTPSNavigationPolicy](webkit/wkwebpagepreferences/preferredhttpsnavigationpolicy.md)
- [securityRestrictionMode](webkit/wkwebpagepreferences/securityrestrictionmode.md)

### Enumerations

- [WKWebpagePreferences.UpgradeToHTTPSPolicy](webkit/wkwebpagepreferences/upgradetohttpspolicy.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)

## See Also

### Web view configuration

- [WKWebViewConfiguration](webkit/wkwebviewconfiguration.md)
- [WKWindowFeatures](webkit/wkwindowfeatures.md)
- [WKProcessPool](webkit/wkprocesspool.md)
- [WKPreferences](webkit/wkpreferences.md)
