When offline, cached web pages often not displaying while present in cache.
Categories
(Core :: Networking, defect, P2)
Tracking
()
People
(Reporter: gtgrippp, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged][necko-priority-next])
Steps to reproduce:
Hello!
1/ I open say 20 tabs from different sites.
2/ I go offline.
3/ I close them.
4/ I reopen the 20 tabs.
Or (maybe the same, or maybe works better to show the problem, I'm not sure):
3/ I restart Firefox to make these tabs suspended.
4/ I click on tabs to load them.
Actual results:
5/ Most probably (99 times / 100 for me), only some of them will show the web page content. Possibly, some only show HTML (or also the web page with some missing elements maybe, like tabs favicons or avatar pictures). I close a 2nd time the ones that are not full, and reopen them.
6/ Most probably, this time some of them finally display all the web content, and some still not. I close and reopen a third time the remaining empty or HTML/incomplete tabs.
7/ Possibly this time some empty or HTML/incomplete pages finally come full fledged, and some stay in the same state, empty or HTML/incomplete.
8/ A fourth closing/reopening seems useless, extra content being not fetched anymore.
Expected results:
I guess all content possibly able to display should come at first opening of a tab when fetched from cache, for a user who hopes to retrieve web pages as much as possible when offline. No content staying invisible while present, or then needing to be brought with a 2nd or 3rd closing/reopening for those who know the trick (me and 3 other persons in the world, that is not much). So users would be less long without the content they want, and maybe also millions of pages network downloads per year would be avoided.
Comment 1•3 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Networking' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•3 months ago
|
||
I think this may be related to race cache with network.
If the network fails because we're offline, we'll fail the channel instead of falling back to the cache.
We should:
- avoid RCWN when offline/no-connectivity
- optionally do not cancel the channel when racing and network comes in first but failed (with a certain subset of error codes).
Thank you for answer @Valentin Gosu. So this issue seems worth considering.
Small problem: I wanted to edit my first post, but I don't look to be allowed to, so well I repost it with the few modifications (secondary ones, to try e.g. to be clearer, not really modifying the issue).
Hello!
I use Lubuntu 22.04 OS, and I have seen this behavior in the 2 Firefox I have installed: Firefox 115 (ESR) and Firefox 126 (Snap version). But I had seen it since 3/4/5 years, I just didn't yet have asked adbout it on internet.
What did you do? (steps to reproduce)
1/ I open say 15 tabs from different sites, or a mix of same/different sites (can maybe change a bit the behavior).
2/ I go offline.
3/ I close them.
4/ I reopen the 15 tabs.
Or (maybe the same, or maybe works better to show the problem, I'm not sure):
3/ I restart Firefox to make these tabs suspended.
4/ I click on tabs to load them.
What happened? (actual results)
(Things will always work more or less like this for me.)
5/ Most probably, only some of them will show the web page content, and some will be empty ("Hmm. We’re having trouble finding that site."). Possibly, some also only show HTML, or the web page has some missing elements, like tabs favicons or avatar pictures. I close a 2nd time these ones that are not full, and reopen them.
6/ Most probably, this time some of them finally display all the web content, and some still not. I close and reopen a third time the remaining empty or HTML/incomplete tabs.
7/ Possibly this time some empty or HTML/incomplete pages finally come full fledged, and some stay in the same state, empty or HTML/incomplete.
8/ A fourth closing/reopening seems useless, no new content being fetched anymore.
What should have happened? (expected results)
I guess all content possibly able to display should come at first opening of a tab when fetched from cache, for a user who hopes to retrieve web pages as much as possible when offline (for e.g. metered or expensive internet subscription, or network loss). No content staying invisible while present, or then needing to be brought with a 2nd or 3rd closing/reopening for those who know the trick (me and 3 other persons in the world, that is not much). So users would be less left without the content they want, and maybe also millions (or billions?) of pages network travel per year would be avoided (for ecological aspect).
Comment 4•3 months ago
|
||
Could you set network.http.rcwn.enabled
to false and check if you can still reproduce the bug?
It would be helpful to confirm that was the problem.
OK thank you, I did the modification, in about:config, and it seems to work!
Out of assurance of the test, I cleared the cache after the modification, in case it can have an influence, so cache was in a new version.
I tried on 8 tabs, all of them reopened totally when offline (not even favicons and avatars missing), which before the modification would have been for me something like "I'm lucky today".
So I tried again on 14 other tabs, and it worked as good as with the 8 tabs.
Except 2 which didn't show any content (https://www.waterfox.net/ and https://www.waterfox.net/download/), I closed and reopened them 2 or 3 times, and still nothing, that is in fact the expected behavior: if there is something to display, that it would be showed at the first loading of the page, and not at the 2nd or 3rd one. These pages at each test don't come from cache, it seems they don't like to go in it or to get out from it.
So it seems perfect (from my non-developper point of view, for afterwards there can be things I don't know that must be taken in account).
Also when I close the 14>17 tabs by selecting them all in the tab bar with Shift+click shortcut > right-click > Close 17 tabs, when reopening them some tabs become empty (and nothing retrived by closing+reopeniss). Maybe not very important, but I will make some more trys and tell.
Comment 6•3 months ago
|
||
(In reply to Valentin Gosu [:valentin] (he/him) from comment #2)
I think this may be related to race cache with network.
If the network fails because we're offline, we'll fail the channel instead of falling back to the cache.
We should:
- avoid RCWN when offline/no-connectivity
- optionally do not cancel the channel when racing and network comes in first but failed (with a certain subset of error codes).
Thank you for checking.
It seems like this is a good course of action then.
Great!
Thanks to you in advance, and to other people if several people work on it.
And about the group-closing > group-reopening that gave empty tabs, I tried again with almost the same tabs, and this time they all came full. I leave my small tests on this I'm lazy and missing time, and maybe it is really not a very important thing, but maybe one day I'll check again.
Description
•