New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 757970 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Tab Discard: Infinite scrolling pages that are discarded reload from beginning

Project Member Reported by igo@chromium.org, Aug 22 2017

Issue description

For websites like Facebook, if you scroll for many many pages, then navigate away, the come back, it can reload the content from the beginning.

We should have a way of bookmarking down the page and returning to where the user was.

I don't *think* we have a bug for this yet.
 

Comment 1 by parisa@chromium.org, Aug 24 2017

Cc: panicker@chromium.org ojan@chromium.org

Comment 2 by ojan@chromium.org, Aug 24 2017

This wouldn't actually work for sites like facebook because when it reloads it actually loads different content.

But for more static content it would. We definitely should restore scroll position. Don't we already do so today? 

Note: We currently restore by pixel offset. We should at some point change it to use the new scroll anchoring logic that is by DOM offsets.

Comment 3 by ojan@chromium.org, Aug 24 2017

Cc: skobes@chromium.org

Comment 4 by ojan@chromium.org, Aug 24 2017

Labels: -Restrict-View-Google
Do we have a component or label for tab discard tasks?

Comment 5 by panicker@google.com, Aug 25 2017

This is not specific to tab discarding right? the case described here is: navigate away and then navigate back.

Comment 6 by igo@chromium.org, Aug 25 2017

re:c5, The specific case we're filing for is during a discard. It is fine to navigate away to gmail for a second and come back and see facebook where you left it. But the problem occurs when one navigates to check an email, or change a song, etc etc., comes back 10 seconds later and the tab is discarded, and the user has to start all over again. The user expects a continuous workflow.

I'm not sure if this is a problem without a discard. But sarahgordon@ (cc'ed) experienced this a lot.

Comment 7 by ojan@chromium.org, Aug 25 2017

I think we're using the word "navigate" differently here. Typically we use navigate for clicking on a link and having the current tab go to a new URL and would call what you're describing as focusing a different tab.

Again, we currently have logic that restores scroll position on crashes. I'd be surprised if that wasn't running for tab discarding, but it's possible. But there's some dynamic pages it won't work for (facebook, twitter, etc.).

Chris, can you confirm that on a page like wikipedia that we do actually restore scroll position when restoring a discarded tab?

I think there is room to improve the logic using scroll anchoring though. The current logic doesn't know *when* to restore scroll. With scroll anchoring we can repeatedly do it during page load until we find the right element to scroll to.

Comment 8 by skobes@chromium.org, Aug 25 2017

 Issue 734679  tracks restoration with scroll anchoring.  That won't do anything for dynamic infinite scrollers though.
BTW I confirmed that on wikipedia we do infact restore scroll position when a discarded tab is revisited.

Comment 10 by igo@chromium.org, Aug 25 2017

re:c7, good point. Yes navigation in my comment was just switching tabs, not clicking a new site in the tab. I will adjust my language.

And yes, i also confirmed, wikipedia will return to the correct spot after discard.

Comment 11 by ojan@chromium.org, Aug 25 2017

I can't think of anything we can do about the facebook/twitter style pages since it's totally different content on reload other than give them an opt-out so they get discarded last. The opt-out has it's own problem of being rife for abuse though.

I do think that the scroll anchoring approach ( issue 734679 ) would help content that is dynamically generated, but the same on every page load though by removing common races (e.g. nytimes).
The plan here is to enable the app to restore itself:
1. run unload on the path to discard: this is to enable the app to save transient view state (session storage), so they are track where user is in FB / twitter
 (Does unload run today in "safe" discard case?)

2. when user revisits provide a signal in the subsequent pageshow event: "previousState", an enum which will return "discarded" in this case
The app can use this signal to restore itself.

However as Ojan said, there isn't a short term solution here.

Components: UI>Browser>TabStrip
Components: -UI>Browser>TabStrip Blink>MemoryAllocator
I don't know what category tab discarding is internally, but it's not browser UI.

Maybe the Blink Memory folks know.
Components: Blink>PageLifecycle

Comment 16 by ojan@chromium.org, May 8 2018

Cc: -ojan@chromium.org
Components: -Blink>MemoryAllocator

Sign in to add a comment