---
title: hasPersistentBackgroundContent
framework: webkit
role: symbol
role_heading: Instance Property
path: webkit/wkwebextension/haspersistentbackgroundcontent
---

# hasPersistentBackgroundContent

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

## Declaration

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

## Discussion

Discussion note: Note that extensions are only allowed to have persistent background content on macOS. An WKWebExtension.Error.Code.invalidBackgroundPersistence error will be reported on iOS, iPadOS, and visionOS if an attempt is made to load a persistent extension.
