Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

run a function in background even when the browser is closed

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.

like image 584
raj dubey Avatar asked Jun 09 '26 16:06

raj dubey


1 Answers

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.

like image 114
Val Avatar answered Jun 11 '26 06:06

Val



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!