How to Get Rid of Google AI Overview in Firefox (and Safari)
Defeating AI Overview without any further tools or extensions.

So, here is a short guide to how to get rid of Google AI Overview in Firefox without the help of any special tools or extensions.
Disclaimer: Follow only, if you have an idea what this is about. Do so on your own risk. Mind that this may have side-effects on other documents and services provided by Google.
1) Set up Firefox For Using Local CSS Rules
Firefox comes with a built-in mechanism for overriding default display rules or any such rules, which are defined by web pages, by user-defined, local ones. Here’s how to set this up:
1.1) Locate your profile folder
Either enter “about:support
” in the location bar of a Firefox window, or go to the menu “Help” (you may have to hold down the ALT key to see this) and select “More Troubleshooting Information”.
This will display a page “Troubleshooting Information” with a table “Application Basics”. Locate the entry “Profile Folder” and click the button next to it to open this (there’s also the path displayed next to this.)
1.2) Create a few necessary files
In your profile folder create
- a folder (directory) “
chrome
” and inside this two plain text files named - “
userChrome.css
” and - “
userContent.css
”.

(“userChrome.css
” is for customizing the Firefox UI,
“userContent.css
” is for defining special rules that apply to any websites. The term “chrome” refers to the user interface in general.)
1.3) Activate local display rules
As a final step, we must activate any rules, which we may write into these files.
Enter “about:config
” into the location bar and confirm the warning dialog. Then, in the page which will open, search for the following property:
toolkit.legacyUserProfileCustomizations.stylesheets

Set this to `true
`. Click the toggle icon on the right to do so.
(This will require a restart of Firefox to take effect. But we’ll come to this anyway…)
2) The Main Act: Defining a Rule to Suppress AI Overview
Open the file “userContent.css
”, we just created, in a text editor. Enter the following CSS code and save it.
@moz-document domain(google.com) { div[data-subtree="mfc"] { display: none !important; } }
(This defines a rule, which only applies to web pages originating from the domain “google.com
” and inhibits the display of any <div>
elements with the attribute “data-subtree="mfc"
”. As it happens, AI Overview is one of them. Maybe it’s the only one, maybe there are more of them — I really don’t know.)
3) Restart Firefox for the Rule to Become Effective
To disable this rule, do any of the following:
- Go to “
about:config
” and set the toggle “toolkit.legacyUserProfileCustomizations.stylesheets
” to `false
`, - put the rule in “
userContent.css
” in a comment (“/* … */
”) and save this, - change the “
domain
” attribute in this rule to something like “example.com
” (this dummy domain is ignored by any browser) and save this, - or, for a more permanent solution, delete this rule and save the file.
(Any of this will require another restart of Fireforx to become effective.)
4) Enjoy Life Like it’s 2024…

Bonus Content: User Stylesheets in Safari (Desktop)
Apple Safari has a similar concept for user-defined stylesheets. Here’s a brief how-to:
1) Open a text file and enter the following content:
div#cnt div#rcnt div[data-subtree="mfc"] { display: none !important; }
Save this under some memorable name in a memorable location (e.g., “safari-user-styles.css
” in your Documents folder.) The file extension must be “.css
”.
(This is similar to the rule for Firefox, but Safari lacks the Mozilla/Firefox-specific grammar to specify a location of origin. Therefore, as this applies to any web page, we visit, we specify a bit more of context. Namely, that this is nested in a division “rcnt
”, which is itself nested in a divison “cnt
”. This double nesting criteria in conjunction with the requirement of that particular data-attribute should be quite specific, but there is no guarantee that no other web page will contain a similar, unrelated construct, which would be affected in the same way. Keep in mind: what can go wrong will go wrong. At the same time, this is also a bit more fragile with regard to how Google composes its search results.)
2) In Safari, open the Preferences (in the Safari menu), go to the “Advanced” tab. Select under “Style sheet” the stylesheet, you just created, as shown:

This will open a file dialog to locate the CSS stylesheet document. Once selected, this pop-up should show the name of the selected document.
(To disable this, simply set this pop-up menu to “None Selected”. No restart should be required for this to take effect.)
3) Enjoy…
And Chrome?
Nice, you asked. Google Chrome removed support for user stylesheets in Chrome #33. Sorry.
(As of writing, we‘re currently at version 140.)
User stylesheets have been with us right from the dawn of the Web, they were in ViolaWWW, a CERN-recommended browser, back in 1992, and they are still described in the W3C specs. Sadly, support for them is dwindling. While Mozilla/Firefox features this useful proprietary extension, which allows us to limit rules to a certain domain of origin, it also puts support behind a configuration flag. As of writing, Apple Safari (desktop) is really the only browser, I‘m familiar with (there may be others, like some variants of Mozilla for certain legacy systems or some rather obscure descendants of KHTML), which still supports them out of the box. (But, here, they are implemented just how they were intended, as a set of display rules to be applied to any web page. Not that ideal, when it comes to customizing the display of a particular website.)
Finally, here’s another example for why we want to get rid of AI Overview:

(The image actually shows two states of AI Overview, providing erroneous information at two distinctive instances. Update: Revisiting this, AI Overview now links to a link farm linking to my blog post rather than linking to me directly. Who doesn’t like a man-in-the-middle?
Also, regarding “2×2 pixel squares”, even if you were to consider “fat pixel” quarter-block graphics as “bitmaps”, these would be 4×4 pixels, or 4×8 pixels for a 80-column PET. And, certainly, switching characters in software implies a dramatic overhead and load on the hardware. It actually consumes the entire CPU for a few characters.)
(We may give it to AI Overview that it includes rather current data to mingle with, while there’s no concept what “current” may even be — is it 2024 or 2025?)
— And that’s all folks. —
Norbert Landsteiner,
Vienna, 2025-08-25