How to make sure a tab in background will keep running?
See original GitHub issueScenario: I am launching chrome with following flags:
'--disable-background-timer-throttling',
'--enable-automation',
'--disable-renderer-backgrounding',
'--disable-backgrounding-occluded-windows',
'--disable-ipc-flooding-protection',
And then utilizing puppeteer to do some operations in a tab in the background while I keep focus on a separate tab.
Expectation: The tasks should happen at normal pace in the background tab Reality: The tasks in the background tab are throttled
Please let me know if there are other details that I can provide. Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (2 by maintainers)
Top Results From Across the Web
How to keep a tab active in the background in Chrome?
go to chrome://discards/ and look for the tab title you want to keep active, then click on 'Toggle' under 'Auto Discardable'. Tick mark...
Read more >How do I let tabs run in background without stopping each ...
Open your music in a separate window, not tab. That should keep your music going unless you saturate your entire installed memory. Last...
Read more >How to Make Google Chrome Tabs Remain Always Active.
To do this, open the browser, then type chrome://flags into the address bar and press Enter. Now use the search box at the...
Read more >How can I get Chrome to stop killing my tabs in the ...
On that page, if you have automatic tab discarding still enabled, you can click "Toggle" next to any tab to prevent it from...
Read more >Keep my code running in the background on one browsertab
Chrome and other browsers have some restrictions on JavaScript running in an inactive tab (low priority, timeout interval must be > 1000 ms, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry for such a delayed response @ecolss.
page.evaluate
based click doesn’t work because the events are untrusted. Read more here: https://github.com/puppeteer/puppeteer#q-whats-the-difference-between-a-trusted-and-untrusted-input-eventpage.click
doesn’t work in backgrounded tabs. This happens because when a tab goes into background, chrome starts to throttle the resources for that tab. This post is old but contains the basic ideas behind it. https://developers.google.com/web/updates/2017/03/background_tabs Note that even with the flag enabled these issues do not go away completely.Hope these answers are helpful.
relevant blog post: https://meowni.ca/posts/metronomes/ & https://metronomes.glitch.me/