prevent firefox from flashing white on loading page

1.9k Views Asked by At

How can I prevent Firefox from flashing a white page before it loads a webpage? I often use dark themes with Firefox (with the Stylus extension), and it is annoying to see a white flash before it loads the dark webpage. Is there some way to change the loading page background color to some other color such as black or dark grey?'

I have seen several webpages that claim to have the solution. However, whenever I try those solutions, they never seem to work. What is the solution with the current most up-to-date version of Firefox?

2

There are 2 best solutions below

0
enigma On
  1. Go to about:config and accept the warning message
  2. Set toolkit.legacyUserProfileCustomizations.stylesheets to true
  3. Create a userChrome.css file according to these instructions: https://www.userchrome.org/how-create-userchrome-css.html
  4. Paste the following into userChrome.css
#browser vbox#appcontent tabbrowser, #content, #tabbrowser-tabpanels, browser[type=content-primary], browser[type=content] > html { background: #222 !important; }
  1. Paste the following into userContent.css:
/* dark blank tab */
@-moz-document url(about:blank), url(about:newtab) {
    #newtab-window, html:not(#ublock0-epicker) {
        background: #222 !important;
    }
}

Source: cml-99 via reddit

1
Ole Aldric On

The most effective way to get rid of this;

Open Firefox settings, search for Color (in the language you have firefox set). Click the Color button and uncheck "use system colors".

Close all firefox windows, then reopen.