Chrome's overscroll history navigation feature can be a blessing and a curse. While it provides a convenient way to navigate back and forward through your browsing history with a simple swipe gesture, it can also be disruptive, especially in kiosk mode or when using touchscreen applications. This article delves into the methods for disabling this feature, offering solutions for various Chrome versions and use cases.
Many users, particularly developers of web applications intended for kiosk or touchscreen environments, have sought ways to disable overscroll history navigation. The initial approach involved using command-line flags when launching Chrome. However, as Chrome evolved, these flags became unreliable and were eventually removed.
The primary issue arises when unintended swipe gestures trigger navigation, disrupting the user experience. The goal is to provide a stable and consistent browsing environment, free from accidental history navigation.
Here are several methods to disable overscroll history navigation in Chrome, catering to different scenarios:
In older versions of Chrome, the --overscroll-history-navigation
flag was a viable solution. To use it, you would launch Chrome with the following command-line arguments:
chrome.exe --overscroll-history-navigation=0 --disable-pinch
--overscroll-history-navigation=0
: This flag was intended to disable the overscroll history navigation feature.--disable-pinch
: This flag disables pinch-to-zoom functionality, which can sometimes interfere with intended touch interactions.Note: This method is unlikely to work on modern versions of Chrome, as the flag has been removed.
chrome://flags
A more direct approach involves accessing Chrome's experimental flags page.
Steps:
chrome://flags/#overscroll-history-navigation
.This method offers a user-friendly way to toggle the feature on or off. However, it requires manual intervention, which isn't ideal for all situations, especially in kiosk environments.
overscroll-behavior
PropertyA more robust and code-centric solution involves using the CSS overscroll-behavior
property. This property allows you to control the browser's behavior when the content of an element overflows.
Implementation:
Add the following CSS to your application's stylesheet:
html, body {
overscroll-behavior: none;
}
overscroll-behavior: none;
: This setting prevents the default overscroll behavior, effectively disabling history navigation via swipe gestures.Applying this CSS to both the html
and body
tags ensures that the entire page is affected, preventing overscroll navigation from any part of the application. Consider applying the style to specific containers if you only want to disable it in certain sections.
This approach is particularly effective for web applications and kiosk environments where you have control over the HTML and CSS.
For Chrome version 92 and later, a different command-line flag can be used:
chrome.exe --disable-features=OverscrollHistoryNavigation
This flag directly disables the overscroll history navigation feature. It provides a more targeted approach compared to previous methods.
The best method for disabling overscroll history navigation depends on your specific needs and the Chrome version you are using:
overscroll-behavior
property is generally the most reliable and maintainable solution.chrome://flags
provides a simple way to toggle the feature.Disabling overscroll history navigation in Chrome requires understanding the available methods and choosing the one that best fits your use case. While older command-line flags are no longer reliable, the CSS overscroll-behavior
property and the --disable-features
flag (for newer versions) offer effective solutions for preventing unwanted history navigation. By implementing these techniques, you can create a more controlled and user-friendly browsing experience.