You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.
This code shows that we create a new browser every time for a new request, this requires more memory and more load time than create a new tab for the same browser.
I wonder what's the thought behind this?
Thanks,
Vincent
The text was updated successfully, but these errors were encountered:
vincent178
changed the title
Launch new chrome tab instead of launch new chrome app
Launch new tab instead of launch new browser
Jun 11, 2018
Generally it keeps things more ephemeral starting a new instance. Others
have found the same:
https://docs.browserless.io/blog/2018/06/04/puppeteer-best-practices.html
Puppeteer just introduce browser contexts for cases like this. The feature
basically open Chrome in incognito tab but you can use the same browser
instance to span across multiple contexts, yet keep cookie stores and
session data separate.
On Sun, Jun 10, 2018, 10:39 PM vincent178 ***@***.***> wrote:
Hi,
Thanks for the nice repo, it is very helpful. Just one issue:
app.all('*', async (request, response, next) => {
response.locals.browser = await puppeteer.launch({
dumpio: true,
// headless: false,
// executablePath: 'google-chrome',
args: ['--no-sandbox', '--disable-setuid-sandbox'], // , '--disable-dev-shm-usage']
});
next(); // pass control on to routes.
});
This code shows that we create a new browser every time for a new request,
this requires more memory and more load time than create a new tab for the
same browser.
I wonder what's the thought behind this?
Thanks,
Vincent
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#34>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAOigCYmIVOXdG7rizaKSAZm3eJzZoPDks5t7gJ0gaJpZM4UiF5y>
.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
Thanks for the nice repo, it is very helpful. Just one issue:
This code shows that we create a new browser every time for a new request, this requires more memory and more load time than create a new tab for the same browser.
I wonder what's the thought behind this?
Thanks,
Vincent
The text was updated successfully, but these errors were encountered: