I need to keep my extension's background.js to be alive infinitely until the browser is closed. Since I migrated to manifest v3, the background.js is a Service worker and after some time the background.js becomes inactive. I have a initialBackgroundProcess function which actually runs only once the browser is opened and it fetches some information and keep it there. Since my background.js becomes inactive, I am now initiating this initial process everytime the extension is rendered, hence making my extension run kinda slower. Can anyone suggest me a method to keep my background.js run infinitely until browser is closed, without it going to inactive?
Asked
Active
Viewed 60 times