Global Privacy Control in WebKit: How to Enable the Sec-GPC: 1 Signal in iOS and macOS 27Note · digest for November 20
European graphic novel story panel showing a WebKit privacy interface and an incoming Sec-GPC HTTP header.
Note3 sections≈ 4 min

Global Privacy Control in WebKit: How to Enable the Sec-GPC: 1 Signal in iOS and macOS 27

How can a native app with an embedded browser cleanly tell websites that the user forbids selling their data to ad networks—without hacking request interceptors or injecting scripts into every iframe? In iOS 27, iPadOS 27, visionOS 27, and macOS 27, there is now a built-in answer. In a WebKit Blog post on November 18, 2026, Apple introduced a public API for the W3C Global Privacy Control (GPC) standard.

Why GPC Isn't Just Another Do Not Track

Hearing 'privacy signal in headers' immediately brings back memories of the old Do Not Track (DNT). You already know how that ended: it was a polite request with no legal teeth, so websites and ad networks simply ignored it.

GPC is much stricter. Under the November 10, 2026 W3C specification draft, the standard gives users an explicit way to opt out of personal data sharing and cross-site targeted advertising. More importantly, real laws back it up. In the very first paragraph of the post, WebKit cites the California Attorney General's office and the CCPA, where GPC is recognized as a legally binding way to opt out of data sales and sharing. Similar rules apply under the Colorado Privacy Act.

In browsers, the signal already makes up a noticeable share of traffic. Brave (a co-author of the standard) sends GPC by default in all modes, while Firefox enables it by default in private windows and offers it in regular browsing via privacy.globalprivacycontrol.enabled. Now WebKit-based apps are joining in.

How to Enable GPC in WKWebView and SwiftUI WebPage

Under the hood, the design is remarkably clean. Instead of fragile header rewriting and manual JS flag injection across frames, you set a single boolean flag in your navigation policy delegate. WebKit propagates the signal across the entire document tree—the main frame, all nested iframe elements, and their subresources like scripts, images, and API calls. Both channels turn on together: the Sec-GPC: 1 HTTP header and navigator.globalPrivacyControl.

For classic WKWebView in UIKit and AppKit, Apple added WKWebpagePreferences.globalPrivacyControlEnabled inside decidePolicyFor navigationAction:

// Enable GPC in the navigation delegate based on user preference
func webView(
  _ webView: WKWebView,
  decidePolicyFor navigationAction: WKNavigationAction,
  preferences: WKWebpagePreferences
) async -> (WKNavigationActionPolicy, WKWebpagePreferences) {
  preferences.globalPrivacyControlEnabled =
    userPrefersGlobalPrivacyControl
  return (.allow, preferences)
}

The same globalPrivacyControlEnabled property is available in Objective-C—set it in the delegate before calling decisionHandler. Network and DOM behavior are identical.

In the modern SwiftUI WebPage component, the API is slightly shorter: preferences arrive as inout, and the property is named WebPage.NavigationPreferences.isGlobalPrivacyControlEnabled:

// In SwiftUI WebPage the flag is called isGlobalPrivacyControlEnabled
func decidePolicy(
  for action: WebPage.NavigationAction,
  preferences: inout WebPage.NavigationPreferences
) async -> WKNavigationActionPolicy {
  preferences.isGlobalPrivacyControlEnabled =
    userPrefersGlobalPrivacyControl
  return .allow
}

A couple of practical notes: developers still build the UI toggle (userPrefersGlobalPrivacyControl) themselves, since WebKit only provides the programmatic mechanism. And because the API debuted in Apple's 27th OS generation, supporting older versions requires an #available check.

What Hits Your Site and How to Read It

As Apple's new OS releases roll out, the share of requests carrying GPC will grow, so websites should check both channels: the read-only navigator.globalPrivacyControl property in the browser (returns true) and the Sec-GPC: 1 header on the server.

// In the browser — inside a Consent Management Platform (CMP) or before analytics
if (navigator.globalPrivacyControl === true) {
  disableCrossContextAds();
}

// On the server — inspect the incoming request HTTP header
const gpcEnabled = request.headers.get("sec-gpc") === "1";

Client checks typically go into a CMP (cookie banner and consent manager) or run before firing ad pixels, while server checks guard backend events sent to third parties. Sites can also serve /.well-known/gpc.json to declare support programmatically. The browser itself won't physically block third-party trackers—WebKit faithfully delivers the user's choice, while actually halting data sharing remains up to the site's code and local laws.

Want a deep diveVotes help us choose what to break down in detail. This material has 0 votes.
Sources · 4