Skip to content

WKWebView

Ken Harris edited this page Sep 8, 2020 · 22 revisions

WebView (on Mac) is the old WebKit view that runs entirely in-process. WKWebView is the new hotness that runs in its own process, for performance and security (so they claim). It has a number of rather significant downsides which made it useless to me for the first several years. Even in 2020, in lags WebView in features, in many ways:

  • It ignores custom URLProtocols. It'll load the protocol and claim to support it, but then ignore it completely.
    • In 10.13, there's a WKURLSchemeHandler! Note that the interface is completely different.
  • Xcode 8 can't add it in IB. (filed: FB5550470)
    • Xcode 9 can! ... sort of.
  • You get a "Reload" context menu (or "Open in New Window", etc?), and it's not easy to disable (NOT FILED)
  • Printing is broken (filed: 36557179)
  • No way to use a user stylesheet (filed: 37652333)
  • To set any configuration on it (like a WKURLSchemeHandler), you need to pass that configuration to its init, which means you can't create it in IB. (filed: FB8653162)
  • Requires the security.network.client entitlement even for displaying static text. (filed: FB8653139)
Clone this wiki locally