Display web content in windows. Implement browser features such as following user-activated links, managing a back-forward list, and managing a history of recently visited pages.


WebKit provides a set of classes to display web content in windows, and implements browser features such as following links when clicked by the user, managing a back-forward list, and managing a history of pages recently visited. WebKit greatly simplifies the complicated process of loading webpages—that is, asynchronously requesting web content from an HTTP server where the response may arrive incrementally, in random order, or partially due to network errors. WebKit also simplifies the process of displaying that content which can contain various MIME types, and compound frame elements each with their own set of scroll bars.



Safari Tools and Features

Optimize your web content for Safari using browser-supported features and tools.



The methods of the WKNavigationDelegate protocol help you implement custom behaviors that are triggered during a web view's process of accepting, loading, and completing a navigation request.


A WKProcessPool object represents a pool of Web Content processes.


A WKWindowFeatures object specifies optional attributes for the containing window when a new web view is requested.


An object that displays interactive web content, such as for an in-app browser.


A collection of properties used to initialize a web view.


A WKPreferences object encapsulates the preference settings for a web view.


The WKUIDelegate class provides methods for presenting native user interface elements on behalf of a webpage.



A WKNavigation object contains information for tracking the loading progress of a webpage.


A WKNavigationAction object contains information about an action that may cause a navigation, used for making policy decisions.


A WKNavigationResponse object contains information about a navigation response, used for making policy decisions.

Back-Forward List


A WKBackForwardList object maintains a list of visited pages used to go back and forward to the most recent page.


A WKBackForwardListItem object represents a webpage in the back-forward list of a web view.

Element and Frame Information


A WKFrameInfo object contains information about a frame on a webpage.

Website Data


A WKWebsiteDataRecord object represents website data grouped by the originating URL’s domain name and suffix.


A WKWebsiteDataStore object represents various types of data used by a chosen website. Data types include cookies, disk and memory caches, and persistent data such as WebSQL, IndexedDB databases, and local storage.

File Loading


A WKOpenPanelParameters object contains the parameters that a file upload control has specified.



A WKUserContentController object provides a way for JavaScript to post messages and inject user scripts to a web view.


A WKScriptMessage object contains information about a message sent from a webpage.


A WKUserScript object represents a script that can be injected into a webpage.


A class conforming to the WKScriptMessageHandler protocol provides a method for receiving messages from JavaScript running in a webpage.

URL Scheme Handling


A protocol for loading resources with URL schemes that WebKit doesn't know how to handle.


A task created to load a resource.

First-party webpages


A WKSecurityOrigin object consists of a host name, a protocol, and a port number. A first-party load is any load URL has the same security origin as the requesting web site. First-party webpages can access each other’s resources such as scripts and databases.



The WKPreviewElement object contains information for previewing a webpage.


The WKPreviewActionItem protocol provides access to the properties of a Preview action item.


Netscape Plug-in APIs and Data Types

Netscape Plug-in APIs and Data Types

Contains functions, data types, structures, and enumerations associated with the Netscape plug-in. Only shows the structure of this information, no extra information is provided.


macOS WebDriver Commands for Safari 11.1 and earlier

WebDriver is a browser-automation API that you use to create automated tests of your web content. The Safari implementation of WebDriver supports the Selenium JSON Wire Protocol.

macOS WebDriver Commands for Safari 12 and later

WebDriver is a browser-automation API that you use to create automated tests of your web content. The Safari implementation of WebDriver supports the W3C endpoints.

About WebDriver for Safari

Read about Safari’s enhanced implementation of a common API for test automation.

Testing with WebDriver in Safari

Enable WebDriver and run a test.


WebKit Enumerations

WebKit enumerations affecting multiple classes.

WebKit Data Types

WebKit data types affecting multiple classes.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software