-
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
Treat error pages that ultimately redirect as non-error pages #10218
Comments
Thanks for filing @ThiagoIII are you able to fill out any more details in the bug report template? Can you provide an example URL or report for what you're talking about?
What specific 404 redirect hack are you referring to? A 404.html page with a JS-based redirect? Is your 404.html a copy of your index but still serves a 404 status code? |
Hi Patrick thanks for the response, and sorry did not know about the bug template. I used React with Router and this 404.html , this is the "hack": With a script at the section of my index.html: So yes I think that a 404.html page with a JS-based redirect. I just wanted to test my components "page" you know, the thing is I just found out that I need to add a few letters to the path so it will work properly I think. Using Chrome 79, windows 8.1 Thanks again |
Thanks very much for the URL and explanation! Lighthouse doesn't currently respect client-side redirects on error pages. #8984 is one step in the path to properly supporting the JS-based redirect like this does though we're likely a ways off. Clever gh-pages workaround though! :) As a workaround for now you could audit the redirected URL directly ( |
Thanks man!
Completly answered my question! Should I close this issue now ? |
I think we can leave this open. Even once we support client-side redirects in general, it will be an extra bit to change the error page behavior. Fixing this is blocked by the work in #8984. |
I have a page hosted on gh-pages with a custom domain built with create-react-app with routes and using the 404 redirect hack, so on the browser is all perfect I can access all my pages like example.com/products directly, but when I try to test it on lighthouse it returns only an error with the 404 code, the test shouldn't have been redirected to the correct page ?
The text was updated successfully, but these errors were encountered: