Google-chrome – Prevent white screen before loading page in chromium

chromiumgoogle-chrome

When a page doesn't load immediately, Chromium and every other browser I tried display a white screen before they get a response from it:

enter image description here

Even though chrome://settings/personal says it's using the GTK+ theme – in my case it's Darklooks, which has a dark background:

enter image description here

Is there a way to avoid this in Chromium? Or, if there isn't, is there a browser that does not have this "issue"?

Best Answer

For Google Chrome and Chromium, you are probably a victim of Issue 1373: Navigating dark background websites results in blinding white flashes between pages.

There's a hack to minimize, but not totally eliminate, your misery described in comment 261:

As a temporary fix, I set the custom user stylesheet to render pages with a black background so that before it receives styling information from the website it renders the window black instead of white, and now it flashes black instead, which is much more bearable on the eyes until a permanent solution is made.

The hack involves adding the following lines to your Custom.css which is located in User Stylesheets in your Default folder. In my case, the path is ~/.config/chromium/Default/User Stylesheets.

html, body{
background-color:#000000; //This sets the background color to black
color:#0000FF; //This sets the text to blue, so you can read it on webpages set to use defaults; white is too hard on my eyes and if you dont put this it will be black on black
}

As for Firefox, I use the following code in userChrome.css located in ~/.mozilla/firefox/profile_name/chrome:

@namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

/*prevent white flash*/
tabbrowser tabpanels { background-color: #111 !important}

If the chrome folder doesn't exist, create it. Note that both chrome and userChrome.css are case-sensitive.