-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
"URL responds with a 200 when offline": initial URL or final URL? #715
Comments
Other dimensions to this question:
|
This is a tough question. When using lighthouse, I tend to test the final URL of my app (the one I end up on after redirects). However, I can see users typing in an initial URL and expect sane results. FWIW, this is the same problem the
Seems 👍 |
another aspect of this is that the CLI and the extension are out of sync on this question, so you'll get different results in practice. The extension can't test |
I think we should just issue a warn-level log if the finalURL has a diff |
Sounds good. To close the loop: another issue with initial vs final URL is clearing storage, which is done per origin. If a redirect goes cross origin the cache, SW, etc are not cleared. In the CLI this is only a problem if not using the default clean Chrome. In the extension you're usually already on the final (possibly redirected) URL, except when sites redirect you to a different origin due to mobile emulation. |
This is an interesting case where a developer using Lighthouse might be looking for a strict or loose interpretation of their question:
The difference is in the second case the URL being visited while offline may not be the initial URL entered if a redirect occurred. Two cases I have in smokehouse are
https://www.airhorner.com
, which redirects tohttps://airhorner.com
, which does work offline. We report it as not working offline because we reload the original URL and the redirect doesn't happen.https://www.chromestatus.com/
which redirects tohttps://www.chromestatus.com/features
, which does work offline, but we again report the initial URL as not working offline.When interpreting the question literally (does
https://www.airhorner.com
work while offline?) the answer is correct right now, but, again, this may be a surprising result if what you're really asking is if the page was open and you go offline, or it's refreshed while offline, does the page still work.Two possible solutions:
The text was updated successfully, but these errors were encountered: