JavaScript Useragent doesn't include "Lighthouse" reference on PSI tool
See original GitHub issueI’m not 100% sure if this bug is specific to PSI, or something that comes from the developers tools emulation it uses, but here’s the situation:
Provide the steps to reproduce
https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fpeixotorms.github.io%2Ftests%2FPSI%2Fjs.html&tab=desktop
Check the screenshot on the Desktop tab
for the useragent that is detected with javascript.
PHP will correctly detect the intended useragent.
Compare with https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=https://peixotorms.github.io/tests/PSI/js.html
What is the current behavior?
When we use the PSI tool via https://developers.google.com/speed/pagespeed/insights/ to test a website… PHP will detect the correct useragent, which includes a reference to Lighthouse.
However, if we use javascript to detect the useragent, it reports the networkUserAgent instead of the same useragent that PHP detects.
What is the expected behavior?
The useragent that is detected by javascript, should match the one that PHP detects. Could be a javascript engine bug on chrome, or something is not set right on the PSI tool.
Environment Information
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
This has now been released! All users agents in PSI should have
Chrome-Lighthouse
in them. Feel free to re-open if this isn’t the case, but this should be g2g.@paulirish I see that #7297 is merged into master and a new release has the
Chrome-Lighthouse
useragent 👍, but when can we expect that it is deployed to Pagespeed Insights? Is that connected to the Github repository or needs a manual ✅approval?I ask this because I am whitelisting Chrome-Lighthouse useragent, but still see a cookiewall being popped up and want to know what to expect with a release on this repository. 😉