Skip to content

Commit

Permalink
Update background-service-worker.mdx (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
aiktb authored Oct 3, 2023
1 parent c801fd7 commit dc8a649
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pages/framework/background-service-worker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ See [with-background](https://github.com/PlasmoHQ/examples/tree/main/with-backgr

## Persisting state

<Callout emoji="⚠️">
Service workers in Plasmo `dev` mode will always remain `active`.
</Callout>

The worker becomes idle after a few seconds of inactivity, and the browser will kill its process entirely after 5 minutes. This means all state (variables, etc.) is lost unless you use a storage engine.

The simplest way to persist your background service worker's state is to use the [storage API](/framework/storage).
Expand Down

1 comment on commit dc8a649

@vercel
Copy link

@vercel vercel bot commented on dc8a649 Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.