A type that specifies the behaviors to use when loading and rendering page content.
Create a `NavigationPreferences` value when you want to change the default rendering behavior of
your web page. Typically, iOS devices render web content for a mobile experience, and Mac devices
render content for a desktop experience.
Members (19)
get · iOS 27.0+
allowsJSHandleCreationInPageWorld
TypeScript
get allowsJSHandleCreationInPageWorld(): Promise<boolean>
Swift declaration
var allowsJSHandleCreationInPageWorld: Bool
Indicates whether `window.webkit.createJSHandle` will be available in `WKContentWorld.page`
The default value of this property is `false`.
Used to apply a custom `referer` header to all resource loads in the frame of this navigation.
get · iOS 26.0+
preferredContentMode
TypeScript
get preferredContentMode(): Promise<WebPage_NavigationPreferences_ContentMode>
Swift declaration
var preferredContentMode: WebPage.NavigationPreferences.ContentMode
The content mode for the web view to use when it loads and renders a webpage.
The default value of this property is `recommended`. The web page ignores this preference for subframe navigation.
var preferredContentMode: WebPage.NavigationPreferences.ContentMode
The content mode for the web view to use when it loads and renders a webpage.
The default value of this property is `recommended`. The web page ignores this preference for subframe navigation.
get · iOS 26.0+
isLockdownModeEnabled
TypeScript
get isLockdownModeEnabled(): Promise<boolean>
Swift declaration
var isLockdownModeEnabled: Bool { get set }
A Boolean value that indicates whether to use Lockdown Mode in the web page.
By default, this reflects whether the user has enabled Lockdown Mode on the device. Update this preference to
override the device setting when you implement a per-website or similar setting.
A Boolean value that indicates whether to use Lockdown Mode in the web page.
By default, this reflects whether the user has enabled Lockdown Mode on the device. Update this preference to
override the device setting when you implement a per-website or similar setting.
get · iOS 26.0+
allowsContentJavaScript
TypeScript
get allowsContentJavaScript(): Promise<boolean>
Swift declaration
var allowsContentJavaScript: Bool
Indicates whether JavaScript from web content is allowed to run.
The default value of this property is `true`. If you change the value to `false`, the web page doesn’t
execute JavaScript code referenced by the web content. That includes JavaScript code found in inline `<script>`
elements, `javascript:` URLs, and all other referenced JavaScript content.
Indicates whether JavaScript from web content is allowed to run.
The default value of this property is `true`. If you change the value to `false`, the web page doesn’t
execute JavaScript code referenced by the web content. That includes JavaScript code found in inline `<script>`
elements, `javascript:` URLs, and all other referenced JavaScript content.
get · iOS 26.4+
securityRestrictionMode
TypeScript
get securityRestrictionMode(): Promise<WebPage_NavigationPreferences_SecurityRestrictionMode>
Swift declaration
var securityRestrictionMode: WebPage.NavigationPreferences.SecurityRestrictionMode { get set }
Security restriction mode for this navigation.
Security restriction modes provide different levels of security hardening for high-risk browsing contexts.
`SecurityRestrictionMode.maximizeCompatibility` provides additional hardening while maintaining full web compatibility:
- JavaScript JIT compilation disabled (interpreter-only execution)
- Increased Memory Tagging Extension (MTE) coverage across allocations in the WebContent process
Setting a security restriction mode creates separate, isolated WebContent processes for the specified protection level.
This preference only applies to main frame navigations and will be ignored for subframe navigations. When set for a main frame, all subframe content and opened windows inherit the same security restrictions.
When the system has chosen `SecurityRestrictionMode.lockdown` (e.g., in Lockdown Mode), attempts to set a less restrictive mode will fail silently.
The default value is `SecurityRestrictionMode.none`.
var securityRestrictionMode: WebPage.NavigationPreferences.SecurityRestrictionMode { get set }
Security restriction mode for this navigation.
Security restriction modes provide different levels of security hardening for high-risk browsing contexts.
`SecurityRestrictionMode.maximizeCompatibility` provides additional hardening while maintaining full web compatibility:
- JavaScript JIT compilation disabled (interpreter-only execution)
- Increased Memory Tagging Extension (MTE) coverage across allocations in the WebContent process
Setting a security restriction mode creates separate, isolated WebContent processes for the specified protection level.
This preference only applies to main frame navigations and will be ignored for subframe navigations. When set for a main frame, all subframe content and opened windows inherit the same security restrictions.
When the system has chosen `SecurityRestrictionMode.lockdown` (e.g., in Lockdown Mode), attempts to set a less restrictive mode will fail silently.
The default value is `SecurityRestrictionMode.none`.
get · iOS 27.0+
isGlobalPrivacyControlEnabled
TypeScript
get isGlobalPrivacyControlEnabled(): Promise<boolean>
Swift declaration
var isGlobalPrivacyControlEnabled: Bool
Whether the Global Privacy Control (GPC) signal is enabled for the navigation.
The default value of this property is `false`. When enabled, both `navigator.globalPrivacyControl`
and the `Sec-GPC: 1` request header are active for the main frame, its subframes, and their subresources.
Whether the Global Privacy Control (GPC) signal is enabled for the navigation.
The default value of this property is `false`. When enabled, both `navigator.globalPrivacyControl`
and the `Sec-GPC: 1` request header are active for the main frame, its subframes, and their subresources.
get · iOS 26.0+
preferredHTTPSNavigationPolicy
TypeScript
get preferredHTTPSNavigationPolicy(): Promise<WebPage_NavigationPreferences_UpgradeToHTTPSPolicy>
Swift declaration
var preferredHTTPSNavigationPolicy: WebPage.NavigationPreferences.UpgradeToHTTPSPolicy
Used when performing a top-level navigation to a webpage.
The default value is `.keepAsRequested`. The stated preference is ignored on subframe navigation, and it may be ignored based on system configuration.
The `WebPage.Configuration.upgradeKnownHostsToHTTPS` property supersedes this property for known hosts.
var preferredHTTPSNavigationPolicy: WebPage.NavigationPreferences.UpgradeToHTTPSPolicy
Used when performing a top-level navigation to a webpage.
The default value is `.keepAsRequested`. The stated preference is ignored on subframe navigation, and it may be ignored based on system configuration.
The `WebPage.Configuration.upgradeKnownHostsToHTTPS` property supersedes this property for known hosts.