Lighthouse: Site always defaults to mobile version when measuring performance

Created on 9 Aug 2017  路  3Comments  路  Source: GoogleChrome/lighthouse

If you try to measure www.barnesandnoble.com with the lighthouse API, it always measures the performance for m.barnesandnoble.com which is the mobile site. I've tried this using the lighthouse chrome addin and with Chrome's debugging tool's "Audit" feature.

duplicate

Most helpful comment

@ashoon that settings object looks suspiciously like puppeteer options, not Lighthouse flags :)

you'd need to add disableDeviceEmulation: true to your LH flags/settings object to browse as desktop

All 3 comments

Thanks for raising this @mjara74. The extension and Audits panel are restricted to mobile emulation/evaluation currently. As a workaround you can use the CLI with the flags --disable-network-throttling --disable-cpu-throttling --disable-mobile-emulation

Duplicate of #2838

Hi @patrickhulce - what's the equivalent Node for desktop browsing - in my settings file I have

module.exports = {
headless: false,
args: [
'--remote-debugging-port=9222',
'--disable-device-emulation',
'--disable-network-throttling',
'--disable-cpu-throttling'
]
};

yet when I run lighthouse it returns to the nexus 5x user-agent (and the mobile site version)

var report = await lighthouse (currentPage, settings, null);

@ashoon that settings object looks suspiciously like puppeteer options, not Lighthouse flags :)

you'd need to add disableDeviceEmulation: true to your LH flags/settings object to browse as desktop

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bitttttten picture bitttttten  路  3Comments

etelai picture etelai  路  3Comments

codepodu picture codepodu  路  3Comments

dkajtoch picture dkajtoch  路  3Comments

wizardnet972 picture wizardnet972  路  3Comments