Is there a way so that I can run a javascript function in the background even when the browser has been closed by the user. It can be done in android apps i have done it too. but don't know about javascript.
It's possible if you make your javascript function into Chrome Extension.
It works even when browser closed.
When any installed hosted app, packaged app, or extension has "background" permission, Chrome runs (invisibly) as soon as the user logs into their computer—before the user launches Chrome. The "background" permission also makes Chrome continue running (even after its last window is closed) until the user explicitly quits Chrome.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With