<!--
{
  "availability" : [
    "iOS: 18.4.0 -",
    "iPadOS: 18.4.0 -",
    "macCatalyst: 18.4.0 -",
    "macOS: 15.4.0 -",
    "visionOS: 2.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKWebExtension/hasPersistentBackgroundContent",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKWebExtension(py)hasPersistentBackgroundContent"
  },
  "title" : "hasPersistentBackgroundContent"
}
-->

# hasPersistentBackgroundContent

A Boolean value indicating whether the extension has background content that stays in memory as long as the extension is loaded.

```
var hasPersistentBackgroundContent: Bool { get }
```

## Discussion> Note: Note that extensions are only allowed to have persistent background content on macOS. An ``doc://com.apple.webkit/documentation/WebKit/WKWebExtension/Error/Code/invalidBackgroundPersistence`` error will be reported on iOS, iPadOS, and visionOS if an attempt is made to load a persistent extension.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)