How to customize/remove Chrome yellow highlight from search result hash bang

Check this reddit thread.

It says that the setting is called ScrollToTextFragmentEnabled, and it could be disabled via Chrome Enterprise Policy.

This worked on Mac:

$ defaults write com.google.Chrome ScrollToTextFragmentEnabled -bool false

In Windows create chrome.reg with contents:

Windows Registry Editor Version 5.00
; chrome version: 84.0.4147.125

[HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome]
"ScrollToTextFragmentEnabled"=dword:00000000

and then double-click it to apply the changes.

For more examples you can download "Chrome ADM/ADMX Templates" from https://chromeenterprise.google/browser/download/, and check policy_templates/windows/examples/chrome.reg


This feature is described by Chrome in the article ScrollToTextFragmentEnabled group policy. It was only recently added to Chrome and may still be evolving. It is not supported by other browsers except for Microsoft Edge and other variants of Chromium.


Under Windows, group policies are specified in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome.

This specific policy is set by the DWORD value ScrollToTextFragmentEnabled whose value is 0 to disable and 1 to enable. Tested as working on Chrome version 84.

For the Mac, see the answer by storoj.

For Linux, Chrome/chromium settings are stored in the .config directory in home. This hidden folder can be unhidden in nautilus by pressing CTRL+H (link).

google chrome: ~/.config/google-chrome/Default/Preferences
chromium: ~/.config/chromium/Default/Preferences

The preference name is ScrollToTextFragmentEnabled. (Not tested by me)


Website designers may elect to disable it for their website by including the HTTP header Document-Policy: force-load-at-top. Unfortunately, users cannot force it on their side, since extensions like Greasemonkey/Tampermonkey cannot modify received HTTP headers.


The List of Chromium Command Line Switches by Peter Beverloo lists this command-line switch:

--disable-scroll-to-text-fragment : This switch disables the ScrollToTextFragment feature

However, under Windows with Chrome version 84 this switch had no effect.