3

I am in the process of migrating v2 Chrome extension to Manifest V3 format. Looking for input what is the best way to maintain the persistent data using chrome storage. In v2 version, the logic is background script is holding the required persistent data(say tabs, document etc) which gets updated on multiple events, Now the same needs to be migrated to V3, so that data is persistent for the life of GoogleChrome instance. Is there an event that gets fired when service worker is just about to become inactive so that data can be stored to chrome storage.(without this, the logic to store the data will be at multiple places in the script, not sure is this the way to do).

Swetha
  • 115
  • 1
  • 7
  • 1
    If these events are frequent see [Persistent Service Worker in Chrome Extension](https://stackoverflow.com/a/66618269) – wOxxOm Oct 19 '21 at 07:59

0 Answers0