SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.42k stars 8.15k forks source link

[🚀 Feature]: Disable downloading of 60+MB language crx files #14342

Closed skyhirider closed 1 month ago

skyhirider commented 2 months ago

Feature and motivation

When initializing Chrome, every instance downloads over 60MB of language files.

This not only wastes bandwidth, but also disk space as if you're quickly starting and closing Chrome sessions these files tend to be left over as they are silently downloaded into your default downloads folder.

https://www.reddit.com/r/chrome/comments/u78vd0/chrome_has_constantly_been_downloading_something/

This behavior can be manually disabled via

--disable-features=OptimizationGuideModelDownloading,OptimizationHintsFetching,OptimizationTargetPrediction,OptimizationHints

I would recommend having this on by default for all sessions created.

Resources https://github.com/cypress-io/cypress/issues/22622 https://issues.chromium.org/issues/40220332 chrome://download-internals/

Usage example

I would run the driver as always, but Chrome would not download these files by default.

It would be transparent to the user.

github-actions[bot] commented 2 months ago

@skyhirider, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

diemol commented 1 month ago

We should not disable things in Chrome by default, which is why we have the method to add arguments ad hoc.

An option would be to do a small blog post informing users about this. Would you like to contribute to that?

I will close this issue now, but we can continue the conversation.

skyhirider commented 1 month ago

If you tell me where and how to publish I can see if I can create an example that replicates it and write about it.

diemol commented 1 month ago

This is where the blog posts go https://github.com/SeleniumHQ/seleniumhq.github.io/tree/trunk/website_and_docs/content/blog/2024

skyhirider commented 1 month ago

@diemol here is the pull https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1853

github-actions[bot] commented 3 weeks ago

This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs.