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

# WKPreferences

An object that encapsulates the standard behaviors to apply to websites.

```
@MainActor class WKPreferences
```

## Overview

Use a [`WKPreferences`](/documentation/WebKit/WKPreferences) object to specify the preferences for your website, including the minimum font size, the JavaScript behavior, and the behavior for handling fraudulent websites. Create this object and assign it to the [`preferences`](/documentation/WebKit/WKWebViewConfiguration/preferences) property of the [`WKWebViewConfiguration`](/documentation/WebKit/WKWebViewConfiguration) object you use to create your web view.

## Topics

### Setting Rendering Preferences

[`minimumFontSize`](/documentation/WebKit/WKPreferences/minimumFontSize)

The minimum font size, in points.

[`shouldPrintBackgrounds`](/documentation/WebKit/WKPreferences/shouldPrintBackgrounds)

A Boolean value that indicates whether to include any background color or graphics when printing content.

### Setting Behavior Preferences

[`tabFocusesLinks`](/documentation/WebKit/WKPreferences/tabFocusesLinks)

A Boolean value that indicates whether pressing the tab key changes the focus to links and form controls.

[`isTextInteractionEnabled`](/documentation/WebKit/WKPreferences/isTextInteractionEnabled)

A Boolean value that indicates whether to allow people to select or otherwise interact with text.

[`isElementFullscreenEnabled`](/documentation/WebKit/WKPreferences/isElementFullscreenEnabled)

A Boolean value that indicates whether a web view can display content full screen.

[`inactiveSchedulingPolicy`](/documentation/WebKit/WKPreferences/inactiveSchedulingPolicy-swift.property)

A policy you set to specify how a web view that’s not in a window handles tasks.

[`WKPreferences.InactiveSchedulingPolicy`](/documentation/WebKit/WKPreferences/InactiveSchedulingPolicy-swift.enum)

An enumeration that lists policies for how a web view that’s not in a window handles tasks.

### Setting Java and JavaScript Preferences

[`javaScriptCanOpenWindowsAutomatically`](/documentation/WebKit/WKPreferences/javaScriptCanOpenWindowsAutomatically)

A Boolean value that indicates whether JavaScript can open windows without user interaction.

[`isSiteSpecificQuirksModeEnabled`](/documentation/WebKit/WKPreferences/isSiteSpecificQuirksModeEnabled)

A Boolean that indicates whether to apply site-specific compatibility workarounds.

### Setting Fraud Warning Preferences

[`isFraudulentWebsiteWarningEnabled`](/documentation/WebKit/WKPreferences/isFraudulentWebsiteWarningEnabled)

A Boolean value that indicates whether the web view shows warnings for suspected fraudulent content, such as malware or phishing attemps.

### Deprecated

[`javaEnabled`](/documentation/WebKit/WKPreferences/javaEnabled)

A Boolean value that indicates whether Java is enabled.

[`javaScriptEnabled`](/documentation/WebKit/WKPreferences/javaScriptEnabled)

A Boolean value that indicates whether JavaScript is enabled.

[`plugInsEnabled`](/documentation/WebKit/WKPreferences/plugInsEnabled)

A Boolean value that indicates whether plug-ins are enabled.



---

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)