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:
Even though chrome://settings/personal says it's using the GTK+ theme - in my case it's Darklooks, which has a dark background:
Is there a way to avoid this in Chromium? Or, if there isn't, is there a browser that does not have this "issue"?
47 Answers
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();
/*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.
As far as I know, all of the old methods that fixed this bug no longer work (in 2016). I came up with a solution today to overcome this issue and wrote about it some which is available here: .
It essentially makes use of an autohotkey script that paints the window onto itself until the next page has loaded, by-passing the period in which the window flashes.
Nice workaround vasa1, the white flashes are gone. But the background of some websites turns black, which is a bit ugly:
So I adapted that CSS and ended up with:
html:not(:hover), body:not(:hover){ background-color:#000000;
}This means that when the cursor is not over the page, the background is set to black - when you click on the new tab button, the cursor is not over the page, so a black background will flash instead of a white one. When you hover the cursor over the page (when you're reading it) the black background is then forgotten, and the website's one is used instead:
UPDATE: I've changed my answer to use temporary dimming of screen as my previous solution was buggy and left the browser scroll state broken.
This solution uses an automator script set up as a service made available to Chrome and finally mapped to a keyboard shortcut in system. The simple solution was to just dim the screen about 5x worked for me but you might wanna play with that sending depending on your brightness. If you use a very dark setting for example, the screen my go completely blank for a second, but that still better than the blaring flash of white.
See
on run {input, parameters} set the_application to (path to frontmost application as Unicode text) repeat 5 times tell application "System Events" key code 107 end tell end repeat delay 1 tell application "System Events" keystroke "t" using command down delay 1 end tell delay 1 repeat 5 times tell application "System Events" key code 113 end tell end repeat return input
end run Installing this Dask Theme eliminated the white screen flash for me on Windows 10.
1Nice one, it works on history. Best thing is to take the original code and change the text to a light color. The second code didn't work, here is one:
This page explains how to change the color flash using a JS
Chrome flashes black screen when using css transition rotate
1I found out that white flash appears only if the browser starts maximized. When started not maximized - there's no flash! So i've changed the shortcut startup properties to minimized and added these parameters: --window-position=-10,-15 --window-size=1700,1040