---
title: WKPreferences
framework: webkit
role: symbol
role_heading: Class
path: webkit/wkpreferences
---

# WKPreferences

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

## Declaration

```swift
@MainActor class WKPreferences
```

## Overview

Overview Use a 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 property of the WKWebViewConfiguration object you use to create your web view.

## Topics

### Setting Rendering Preferences

- [minimumFontSize](webkit/wkpreferences/minimumfontsize.md)
- [shouldPrintBackgrounds](webkit/wkpreferences/shouldprintbackgrounds.md)

### Setting Behavior Preferences

- [tabFocusesLinks](webkit/wkpreferences/tabfocuseslinks.md)
- [isTextInteractionEnabled](webkit/wkpreferences/istextinteractionenabled.md)
- [isElementFullscreenEnabled](webkit/wkpreferences/iselementfullscreenenabled.md)
- [inactiveSchedulingPolicy](webkit/wkpreferences/inactiveschedulingpolicy-swift.property.md)
- [WKPreferences.InactiveSchedulingPolicy](webkit/wkpreferences/inactiveschedulingpolicy-swift.enum.md)

### Setting Java and JavaScript Preferences

- [javaScriptCanOpenWindowsAutomatically](webkit/wkpreferences/javascriptcanopenwindowsautomatically.md)
- [isSiteSpecificQuirksModeEnabled](webkit/wkpreferences/issitespecificquirksmodeenabled.md)

### Setting Fraud Warning Preferences

- [isFraudulentWebsiteWarningEnabled](webkit/wkpreferences/isfraudulentwebsitewarningenabled.md)

### Deprecated

- [javaEnabled](webkit/wkpreferences/javaenabled.md)
- [javaScriptEnabled](webkit/wkpreferences/javascriptenabled.md)
- [plugInsEnabled](webkit/wkpreferences/pluginsenabled.md)

### Initializers

- [init(coder:)](webkit/wkpreferences/init(coder:).md)

### Instance Properties

- [isLookToScrollEnabled](webkit/wkpreferences/islooktoscrollenabled.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)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [Sendable](swift/sendable.md)

## See Also

### Web view configuration

- [WKWebViewConfiguration](webkit/wkwebviewconfiguration.md)
- [WKWindowFeatures](webkit/wkwindowfeatures.md)
- [WKProcessPool](webkit/wkprocesspool.md)
- [WKWebpagePreferences](webkit/wkwebpagepreferences.md)
