-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
works-offline: false positive for photopea.com #6502
Comments
Taking a guess, but self.addEventListener('fetch', function(event) {
event.respondWith(
caches.match(event.request)
.then(function(response) {
// Cache hit - return response
if (response) {
return response;
}
return fetch(event.request);
}
)
);
}); I could imagine |
Ah, that seems very probable. We should see what we can do to be able to detect that. Then there's the audit-level question of "if it works offline, does it matter?" :) Right now we define that narrowly as navigating to |
Hmm 🤔. So there's no cache storage cache at all, so the Which means, we always go through the "else" case of |
I'm running into the same issue. I created a small project to help reproduce the issue, if that's useful at all. 😄 |
Guys, I am really scared by Google now. Many people just want to add the icon to their homescreen, which will open a specific website without a browser UI. Google decided, that it should be allowed only to websites with a service worker. So I have to add the "empty" service worker to my website, just to allow people to add that icon. I think it is really wrong, as the empty service worker does not do anything, and it is just an extra HTTP request. I am afraid, that when 99% of the web experience will be done in Chromium, nobody will have power to argue with Google about the web standards, as Google will be free to define what the standard is. |
Confirmed this case is now properly detected in LH 7.0 after the changes to PWA installability detection. Thanks so much for the super-easy-to-use repro case, @cdegit! |
Provide the steps to reproduce
What is the current result?
works offline
What is the expected result?
does not work offline.
This can be seen if you go offline manually and load the page, or just look at the SW (nothing is cached).
Lighthouse instead reports that the page does work offline. The check is working correctly from Lighthouse's perspective (or at least from the
offline
gatherer's perspective). You can see that the page loads, and if you look at the network record it's inspecting:Main Network Record
The url matches,
statusCode
is 200, andfetchedViaServiceWorker
is true (andfromDiskCache
andfromMemoryCache
are false, to boot).However, adding a breakpoint there and connecting to the chrome being tested, there's still nothing in the cache and the sw is throwing errors.
So where is that record coming from?
The text was updated successfully, but these errors were encountered: