-
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
Long attribute value truncation fires off requests to the truncated URLs #11465
Comments
Thanks for filing @Lofesa I just ran into this the other day too. I'm not sure why Lighthouse is triggering a request to the truncated URL we create. We'll have to look into it. |
Hi @patrickhulce |
When I instrument afterPass network requests, for this site (at least) it happens in both the lighthouse/lighthouse-core/lib/page-functions.js Lines 127 to 143 in 6062f8b
The clone of an This request doesn't affect anything, it's just a cloned node that's not in the DOM and also isn't used by Lighthouse for anything but the snippet, but it's also kind of weird. I think we'd need to take a pretty different approach to creating the snippet (or never truncate |
cc @Beytoven I think this has come up before, does it seem familiar to you? |
image elements have some atypical characteristics when it comes to loading. eg. img = new Image();
img instanceof HTMLImageElement // TRUE.. yes the Image() constructor is a full fledged html element
img.src = 'stuff' // immediately kicks off this network request, even tho this image isn't part of the DOM (i think part of this is legacy web stuff) anyhow, that aside, i think we can get around this loading behavior with the use of a const clone = element.cloneNode();
+ const temp = document.createElement('template')
+ temp.content.append(clone)
clone.setAttribute(..... within that |
We have the same issue. We are running PSI every 15 minutes on some of our URLs and this results in multiple thousand malformed requests to our sub-resources with a truncated URI (%E2%80%A6). Our operations team is complaining massively because they are hindered to see real issues within our e-commerce site. |
I submitted #11503 that fixes the issue. |
I'm still seeing this in the logs when I run tests through https://developers.google.com/speed/pagespeed/insights/ This is what I get in the logs, URLs exactly cut at 74 characters (including the domain). |
Page speed insights hasn't updated yet. No date for when it will. |
Summary
When I fecht my site with PSI I´m getting url´s in the server log like:
66.102.8.51 - - [19/Sep/2020:15:50:49 +0200] "GET /ensenanza/wp-content/uploads/2020/09/xbanner-h%E2%80%A6 HTTP/1.1" 404 28312 "https://intersindicalrm.org/ensenanza/" "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4143.7 Mobile Safari/537.36 Chrome-Lighthouse"
and in PSI
When the page is fechted with Search Console there is no error
The text was updated successfully, but these errors were encountered: