One of the strengths of the web is progressive loading, which means that there is no install step and users can start consuming content almost immediately while the site keeps loading. But progressive loading can also result in annoyances, such as an unexpected page jump when offscreen content loads and pushes down what’s currently on the screen. This can be even worse on mobile devices, since smaller screens mean more content is offscreen and page jumps are more likely.
Since its early days, Chrome has taken a stand against bad or abusive content. For instance,
warns users before they visit malicious websites, and
visual indicators on tabs
allow our users to quickly track down the source of unexpected noise. Similar to other features designed to protect our users from bad experiences, starting in version 56 Chrome prevents these unexpected page jumps with a new feature called scroll anchoring. This feature works by locking the scroll position on an on-screen element to keep our users in the same spot even as offscreen content continues to load.
Side by side comparison
of a web page with scroll anchoring disabled (left) and enabled (right).
Due to the expressiveness of the web, there might be some content for which scroll anchoring is either unwanted or misbehaving. For this reason, this feature ships alongside the
”overflow-anchor” CSS property
to override the functionality. To further minimize potential issues, scroll anchoring is disabled on complex interactive layouts via
, and on back/forward navigations to allow for scroll restoration.
Today, scroll anchoring is preventing about three page jumps per page-view, but with your help it could be even better. Get involved by participating in the
scroll anchoring Web Platform Incubator Community Group
, submitting feedback via
, and designing your websites or services with a no-reflow mindset.
Posted by Steve Kobes, “The Unbouncer”