Skip to content
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

redirects audit perhaps too lenient #14895

Closed
connorjclark opened this issue Mar 15, 2023 · 2 comments · Fixed by #15401
Closed

redirects audit perhaps too lenient #14895

connorjclark opened this issue Mar 15, 2023 · 2 comments · Fixed by #15401
Assignees
Labels

Comments

@connorjclark
Copy link
Collaborator

The redirects audit currently always passed when there is a single redirect present, even if significant:

image

It's been this way since it was introduced:

https://github.com/GoogleChrome/lighthouse/pull/3308/files#diff-dd1c921c5fb418fc98a727bbbfca7e0ca696b0441fd5c9b5ebf6353df72b2168R46-R50

The impact of hiding this audit in this case is not so bad, since there will be a very visible warning at the top of the report about a redirect. But, in PSI when use_original_url=true is set, the information is hidden away. Also, if we end up grouping audits by LCP phase we're going to want this audit to not show as passing when there is a real problem.

I couldn't work out why an allowance was made for a single redirect, does anyone know?

@brendankenny
Copy link
Member

I couldn't work out why an allowance was made for a single redirect, does anyone know?

I ran into this when writing tests for #14838 and was very surprised.

The only hint I see is

Looking at psi it allows 1 redirect (not sure if we should only consider subdomains as allowed redirects).
https://example.com -> https://m.example.com

in #3308, so I assume it was some ancient allowance in old PSI for mobile site redirects back when that was more of a thing and it's carried through otherwise unquestioned.

Maybe worth more discussion but if the time wasted redirecting is significant then it's significant, regardless of if it was 1 or 2+ redirects. Seems like the count check should be dropped.

@adamraine
Copy link
Member

adamraine commented Aug 22, 2023

With our focus on audit impact instead of arbitrary scoring criteria in primo prio, we should definitely do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants