Regression: Undo close tab always loads pages from cache

Talk about code development, features, specific bugzilla bugs, enhancements, patches, and other highly technical things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific referenced Bugzilla bugs, mercurial, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Most "bug reports" do not belong in this board and should initially be posted in Community Support or other relevant support boards.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
Post Reply
User avatar
adesh
Board Warrior
Board Warrior
Posts: 1045
Joined: 2017-06-06, 07:38

Regression: Undo close tab always loads pages from cache

Post by adesh » 2020-04-14, 12:05

Quite recently Pale Moon started using just the cache to fetch the pages when performing "undo close tab" (using Ctrl + Shift + T if that matters). Earlier there was a slight delay in such cases, now the browser pauses for about half a second and brings the page without checking with the network. This will be more evident if you repeat again and again for the same tab. GitHub pages can be used as examples, which always used to be fetched from the network when reopened.

Suspect commit: Max concurrent loading tabs setting bypassed if cache_behavior = refresh
Last edited by adesh on 2020-04-14, 12:20, edited 1 time in total.

User avatar
New Tobin Paradigm
Off-Topic Sheriff
Off-Topic Sheriff
Posts: 7339
Joined: 2012-10-09, 19:37
Location: Binary Outcast

Re: Regression: Undo close tab always loads pages from cache

Post by New Tobin Paradigm » 2020-04-14, 12:08

Change the pref?

User avatar
adesh
Board Warrior
Board Warrior
Posts: 1045
Joined: 2017-06-06, 07:38

Re: Regression: Undo close tab always loads pages from cache

Post by adesh » 2020-04-14, 20:27

I haven't changed the pref, cache behaviour is set to soft refresh.

Code: Select all

browser.sessionstore.cache_behavior;1

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 27036
Joined: 2011-08-28, 17:27
Location: 58°2'16"N 14°58'31"E
Contact:

Re: Regression: Undo close tab always loads pages from cache

Post by Moonchild » 2020-04-15, 06:11

So you're saying you want soft refresh, but NOT restoring tabs on-demand, yet still having and on-demand refresh by undoing a closed tab?

IMHO it's actually more logical to always pull undo-close tabs from cache. Issuing a refresh is not undoing the close operation.
"There will be times when the position you advocate, no matter how well framed and supported, will not be accepted by the public simply because you are who you are." -- Merrill Rose
Image

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 27036
Joined: 2011-08-28, 17:27
Location: 58°2'16"N 14°58'31"E
Contact:

Re: Regression: Undo close tab always loads pages from cache

Post by Moonchild » 2020-04-15, 06:17

It's actually worse in -release (prior to this patch) if cache is set to 1 or 2. Mozilla has indeed re-used sessionstore restore routines for undo close. Not sure what they were thinking but I guess (without deeply analysing the large amount of JS) that there must have been a reason to do it this way.
Undoing a closed tab with load tabs on demand unchecked and cache behaviour 1 or 2 triggered a reload of all tabs for me. :wtf:

EDIT: actually that reload was just tabs that were lulled to sleep by lull the tabs. Still, that shoudn't happen either.
"There will be times when the position you advocate, no matter how well framed and supported, will not be accepted by the public simply because you are who you are." -- Merrill Rose
Image

User avatar
adesh
Board Warrior
Board Warrior
Posts: 1045
Joined: 2017-06-06, 07:38

Re: Regression: Undo close tab always loads pages from cache

Post by adesh » 2020-04-15, 10:59

Thinking about it some more, I think the current behaviour is the indeed the correct one. Undo should restore the tab state in a way as if tab was never closed. But this has some unintended side effects.

What happens if the page is evicted from the cache?
In such a case, undoing the action just results in a blank white page. I didn't try to do it in normal mode, but could see things to this effect in a 10-15 minutes long private browsing session.

Finally, the existing behaviour, albeit incorrect, continuing for so long has become the expected. I think may people will notice it on the release and scream about it.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 27036
Joined: 2011-08-28, 17:27
Location: 58°2'16"N 14°58'31"E
Contact:

Re: Regression: Undo close tab always loads pages from cache

Post by Moonchild » 2020-04-15, 14:29

Hey I can keep it at 0 but this bug needed fixing anyway since it's been broken ever since the caching pref was introduced.
"There will be times when the position you advocate, no matter how well framed and supported, will not be accepted by the public simply because you are who you are." -- Merrill Rose
Image

Post Reply