-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Properly size images" providing incorrect current sizes #9726
Comments
Thanks for filing @philkrie! That server responds differently to this image request depending on the User-Agent. When requested by Lighthouse's UA (A Nexus 5X Android phone with a
|
@patrickhulce thanks for the quick response! When you run a LH test, is this the reason for why the page appears to load multiple times? Basically once with the LH UA and once the Chrome UA. When preserving the network log, I'm not able to get this WebP image to appear in the Network tab, so it looks like the Network tab doesn't measure requests made by LH. Is there way to capture this, or for LH to use the same user agent as the browser? Otherwise I'm assuming the only resolution here is to ensure that the server serves the same resources to the LH UA as it does to a Chrome mobile UA. |
Canary Chrome will now. |
Got it, is LH going to run in the same context as the rest of DevTools from now on, or just certain parts? I noticed in canary LH will also reflect blocked requests. |
We only override the network throttling / device screen emulation (the options in the Audits panel). Everything else sticks. |
@connorjclark pretty much covered it 👍 To circle back to
No, we only load with the LH UA when loading as mobile but there are multiple passes for
|
Great, thanks for the explanations! One final question related to this: Is there a specific technical reason why LH needs its own UA? Would it not be possible to render the page using the regular Chrome UA? |
Technical reason, no. Policy reason, yes. Folks want to know where automated traffic is coming from. FWIW, the UA is identical to a Nexus 5X with the only modification being |
Looks like this issue was addressed. If not, please comment and we can reopen. |
Provide the steps to reproduce
What is the current behavior?
LH shows images as having higher weight than reported in the Network tab.
As seen below, https://static.musiciansfriend.com/thehub/binaries/content/gallery/mf/behind-the-gear/kauer-guitars-shop.jpg?imwidth=300 is reported to have a size of 198 KB.
The network tab shows that it has a size of 26.6 KB
What is the expected behavior?
These numbers should line up, since clients are more likely to view the Network tab as the source of truth. This degrades trust in the test.
Environment Information
The text was updated successfully, but these errors were encountered: