-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Source Map is downloaded during performance audit #12064
Comments
Since we're a diagnostic tool, I think it's totally fair for Lighthouse to attempt these downloads. We do it to provide better detail and actionability in the opportunities. Similarly, chrome devtools makes the same network requests if JS sourcemaps are enabled (the default). I see the webmasters support thread.... but it's unclear how this is a problem for site owners... perhaps it's unexpected to see them in request logs? |
I think think the issue in the video that's valid is that it prompts Chrome's download UI. DevTools doesn't trigger Chrome's download UI. Probably to do with our weird iframe fetcher? |
ah, yeah, I didn't spot that in the video either :) In theory the request should be cancelled and never download: lighthouse/lighthouse-core/gather/fetcher.js Lines 135 to 136 in aaf1365
Can't repro in CLI but I can in DevTools (Chrome 90, Lighthouse 7.0.1). |
Since we last discussed protocol support for fetching resources, the protocol method has landed ( |
i looked into this stuff a bit and filed a new issue: Improve generalized/sourcemap fetcher #12070 |
I was looking as to why one would use octet-stream as the mimetype for sourcemaps... Looks like some bozo confirmed it was fine 8 years ago. 😳 But yes unfortunately that mimetype + how lighthouse fetches == a download. We can change this in Lighthouse but, @developit, in the meantime.. serving sourcemaps as |
Should we close this in favor of #12070? The current fetcher is also incompatible with some CSPs. Considering there are two issues breaking the current fetcher, we should probably seek a different implementation that uses |
good call. sg |
Provide the steps to reproduce
What is the current behavior?
During the lighthouse Performance audit, Source Map files are downloaded:
lighthouse-sourcemap-download.mov
What is the expected behavior?
No downloads are triggered during Lighthouse execution.
Environment Information
Related issues
https://support.google.com/webmasters/thread/86647663?hl=en
The text was updated successfully, but these errors were encountered: