Lighthouse passes inconsistent User Agent on Redirect
See original GitHub issueFAQ
- Yes, my issue is not about variability or throttling.
- Yes, my issue is not about a specific accessibility audit (file with axe-core instead).
URL
https://www.etsy.com/listing/1041475753
What happened?
Lighthouse passes a different UA than chrome dev tools, causing subtle odd bugs with device detection.
Lighthouse: Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4590.2 Mobile Safari/537.36 Chrome-Lighthouse
Chrome: Mozilla/5.0 (Linux; Android 6.0.1; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Mobile Safari/537.36
What did you expect?
We see the same user agent exactly for easier debugging.
What have you tried?
I checked the Etsy server logs to validate that the user agents differ.
How were you running Lighthouse?
Chrome DevTools
Lighthouse Version
8.4.0
Chrome Version
95
Node Version
No response
OS
Mac
Relevant log output
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Redirect in chrome responsive simulator changing user agent
When I do a request to a page that returns a 302 redirect in the chrome responsive simulator I see a new request...
Read more >SEO Spider Tabs - Screaming Frog
Please note, redirects are counted as a level currently in our page depth ... So inconsistent use of links that are follow and...
Read more >Untitled
Bonvarlet arnaud, Redirect if user not logged in mvc, De liemers helpt, Montant du rmi. How to focus the oculory xbox 360, Exo...
Read more >When indexing goes wrong: how Google Search recovered ...
Index coverage report for indexed pages, which shows an example of the data annotations that we can include to notify users of specific...
Read more >The Website Migration Guide: SEO Strategy, Process ... - Moz
Despite some of Google's claims that 302 redirects pass PageRank, ... websites alter the HTML for mobile user agents and the vary HTTP ......
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
@paulirish That’s a fair estimation of what’s going on - DeviceAtlas’ return value for any Moto G4 user agent I’ve tested seems to be a mobile device, but not a mobile phone. And accordingly, we’re having to change our internal device identification logic to check either field.
To be clear, I don’t think the issue of slight variations between Chrome device emulation’s Moto G4 user agent and the one sent by Lighthouse are an issue for our use case. For pure debugging purposes, I was surprised that they weren’t identical. If it’s relatively simple to sync the android and chrome versions here, that would be a satisfying level of internal consistency.
Thanks a bunch!
its the same here. my UA (emulated):
Mozilla/5.0 (Linux; Android 6.0.1; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Mobile Safari/537.36
after redirect:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36