I have analysed over 10000 websites with lighthouse thru the command line. The command that I am running is:
lighthouse https://[website.com]/ --chrome-flags="--headless" --quite --output json --output-path /var/www/soleadify/public/[www.website.com.json]
For every website that I have analysed I get the same result:
"mobile-friendly": {
"score": false,
"displayValue": "",
"rawValue": false,
"scoringMode": "binary",
"informative": true,
"manual": true,
"name": "mobile-friendly",
"description": "Page is mobile friendly",
"helpText": "Take the [Mobile-Friendly Test](https://search.google.com/test/mobile-friendly) to check for audits not covered by Lighthouse, like sizing tap targets appropriately. [Learn more](https://developers.google.com/search/mobile-sites/)."
score}
From my knowledge lighthouse can run a test to check if the page is mobile friendly or not. But for every page that I try I get that its not, even if many of them are.
Am I doing something wrong here?
would you mind sharing the links of the sites you've tested ? that would help debug this a lot easier
Sure, just a few examples:
lighthouse http://www.boulevardtire.com --quiet --disable-network-throttling --disable-cpu-throttling --chrome-flags="--headless --disable-gpu" --output json --output-path /var/www/soleadify/public/www.boulevardtire.com.json
lighthouse http://www.alwaysbailbonds.com --quiet --disable-network-throttling --disable-cpu-throttling --chrome-flags="--headless --disable-gpu" --output json --output-path /var/www/soleadify/public/www.alwaysbailbonds.com.json
lighthouse http://floridaflightdoctor.com --quiet --disable-network-throttling --disable-cpu-throttling --chrome-flags="--headless --disable-gpu" --output json --output-path /var/www/soleadify/public/floridaflightdoctor.com.json
lighthouse https://www.littler.com --quiet --disable-network-throttling --disable-cpu-throttling --chrome-flags="--headless --disable-gpu" --output json --output-path /var/www/soleadify/public/www.littler.com.json
@mihaivinaga that audit is marked as "manual" which means it's just a message telling you to...
Take the Mobile-Friendly Test to check for audits not covered by Lighthouse, like sizing tap targets appropriately. Learn more.
The result is static; it won't change.
@patrickhulce So lighthouse does not test for mobile-friendly?
@mihaivinaga there are lots of audits that test for aspects of mobile friendliness (e.g. all the performance audits are mobile-focused, we load with mobile emulation by default, webapp-install-banner, works-offline, viewport, content-width, all the PWA category audits, etc).
There are a few items that we have to implement (like #4358) that mobile friendly test covers that we don't yet which is why the message is included for now.
@patrickhulce From the json report can I make an educated guess if the website is mobile friendly or not? And if yes could you please tell what data and values from the report can I use to extract that info?
Lighthouse does not have a binary signal of whether a page is "mobile friendly." As with many categories, sites can be more/less mobile friendly than others but setting a specific threshold depends on the use case :)
At a minimum if a site has failed the viewport or content-width audits, it is a sign they have made no effort whatsoever to make the page mobile friendly. Failing load-fast-enough-for-pwa is also a sign that the user experience will be very poor on a mobile connection.
// Using v2 API it might look like...
const results = await lighthouse(...);
const isMinimallyMobileFriendly = results.audits.viewport.score !== 0 &&
results.audits['content-width'].score !== 0 &&
results.audits['load-fast-enough-for-pwa'].score !== 0
Thanks @patrickhulce, that makes sense, I was thinking on such a implementation. Is there any timeframe on making lighthouse providing the information if a website is mobile friendly or not? This issue can be closed.
Google Search has their own impl of evaluating mobile friendliness, though I believe it's quite similar to ours. Unfortunately an open source version of it doesnt exist, so we'll just refer people to use their tool instead.
thanks for working with us.