GoogleChrome / GoogleChrome/lighthouse
Set navigator.connection.effectiveType to '3g' while running an audit
- Dominant language
- JavaScript
- Stars
- 30.8k
- Forks
- 9.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 20
Description
## Provide the steps to reproduce
1. Run LH on https://project-reachdigital-nl-git-feature-lighthouse.reachdigital.now.sh/
2. Run lighthouse audit in chrome and see console
3. Run lighthouse@next and see it complain about improperly sized images for cellular networks.
#### What is the current behavior?
The server's SSR generated HTML will provide properly mobile sized images with a relatively low quality and 1x size and it will upgrade those images to higher quality ones if the effectiveType is 4g.
This works great when I set the network simulation in the chrome inspector to 'Fast 3g' (or lower), but when running the lighthouse audit (in chrome) it will now use low quality images.
#### What is the expected behavior?
I would expect lighthouse to set the effectiveType to 3g so I can prevent upgrading images to a higher quality version.
#### Environment Information
* Affected Channels:
* Lighthouse version:
* Chrome version: 81.0.4044.138
* Node.js version: 12
* Operating System: osx / serverless deploy
Contributor guide
Assessment
This issue has not been assessed yet.