You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the test for a "200 OK" response to an offline navigation does a good job of confirming that a web app works offline, it doesn't check that navigations are handled via an offline-first strategy. Currently, a web app might use a network-falling-back-to-cache strategy for handling navigations and still get a perfect Lighthouse score, even though the network request will behave poorly in a lie-fi or a high-latency network.
Would it be possible to create a new test which checked whether the HTTP request used for a navigation was fulfilled via a network request, and fail that test if it was?
One wrinkle is that a web app which used a stale-while-revalidate strategy for navigations should pass the test, since the HTTP request was fulfilled from the cache. While there's a network request made, the network doesn't block the page from getting the cached result.
Based on my last attempt at a related PR, I'm not sure that I have the familiarity with Chrome's debugging protocol to properly implement this, but I'm happy to review PRs, and provide some passing and failing test cases.
Would this require debugger protocol or just analysis of the network logs? The current fourth pass (mostly DoBetterWeb gatherers) has network recording on and the page should be well cached by then if it's going to be.
One wrinkle is that a web app which used a stale-while-revalidate strategy for navigations should pass the test, since the HTTP request was fulfilled from the cache. While there's a network request made, the network doesn't block the page from getting the cached result.
It seems like this should be identical to testing a site that's serving from the cache, you just don't want to get distracted by a separate request that never gets returned to the page
While the test for a "200 OK" response to an offline navigation does a good job of confirming that a web app works offline, it doesn't check that navigations are handled via an offline-first strategy. Currently, a web app might use a network-falling-back-to-cache strategy for handling navigations and still get a perfect Lighthouse score, even though the network request will behave poorly in a lie-fi or a high-latency network.
Would it be possible to create a new test which checked whether the HTTP request used for a navigation was fulfilled via a network request, and fail that test if it was?
One wrinkle is that a web app which used a stale-while-revalidate strategy for navigations should pass the test, since the HTTP request was fulfilled from the cache. While there's a network request made, the network doesn't block the page from getting the cached result.
Based on my last attempt at a related PR, I'm not sure that I have the familiarity with Chrome's debugging protocol to properly implement this, but I'm happy to review PRs, and provide some passing and failing test cases.
CC: @addyosmani @slightlyoff
The text was updated successfully, but these errors were encountered: