GoogleChromeLabs / estimator.dev

🧮 Calculate the size and performance impact of switching to modern JavaScript syntax.
https://estimator.dev
Apache License 2.0
665 stars 23 forks source link

Emulating a real version of chrome. Headless mode have special user agent #3

Closed Tom910 closed 3 years ago

Tom910 commented 3 years ago

Thanks for the great instrument. I checked my site https://www.tinkoff.ru/ and noticed that estimator don't send user agent from the new Browser.

estimator use puppeter in headless mode and send user agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/88.0.4298.0 Safari/537.36 this user agent unusual

I replace this value and emulate real browser

google-cla[bot] commented 3 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

Tom910 commented 3 years ago

@googlebot I signed it!