Forum Moderators: open

Message Too Old, No Replies

White flash in IE

         

Bert36

11:50 am on Sep 26, 2009 (gmt 0)

10+ Year Member



The problem:
Websites with a dark background seem to show a "white flash" when loading a page in IE (6,7,8).

I have searched the net extensively for a cause and a solution. And I found loads of answers and solutions, none of which seem to work universally. Some of the causes and workarounds found are:

1) IE renders the page before all CSS has loaded. Solution: Include and empty script-element BEFORE the stylesheets.
2) Include meta-tags for page-enter and page-exit transitions
3) IE chokes on the content-type meta-tag; remove it.
4) Minimize CSS and JS files.
5) change background-color of body or html

And there are lots more causes and solutions to be found.
I tried them all, and I found they work sometimes. For me solution 1) always works, but for a client of mine none of these solutions work. Which makes me think there must be more to this problem?
I have even seen someone suggest (on this forum I believe) that it has to do with the geographical location of the server?

I for one would like to get to the bottom of this problem. Does anyone have an idea what is really going on here?

kaled

8:44 pm on Sep 26, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Geolocation of the server is unlikely to have a consistent effect (but latency times might).

The empty script hack is new to me - have you checked that your client has javascript is enabled?

Try using embedded CSS (i.e. not in an external file) directly after the <head> tag to set the background-color of both html and body. If that doesn't fix it then I'd be inclined to say it's unfixable in the general case. As you have discovered, hacks might be effective but ultimately are likely to be unreliable. Browsers are multi-threaded beasts that can have various toolbars and extensions installed that can all affect timing - and security software get's in on the act too. Also, device drivers, operating system and hardware acceleration will play a part. These add up to mean that unwanted transients while a page is loading are sometimes a fact of life.

Kaled.

Bert36

8:38 am on Sep 27, 2009 (gmt 0)

10+ Year Member



Yes, he has javascript enabled.
I already tried the embedded "set background style" trick (didn't mention it in the list above). But it didn't work.

I am inclined to agree with you. It must be a combination of factors that play a role in this. Other software, plugins, etc. etc.
Still, only IE has this problem, so what can be the underlying reason for that? What does IE do that other browsers don't so the flash appears?

kaled

9:45 am on Sep 27, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you are looking for a definitive answer (that others have missed) you'll have experiment...

1) You need two test pages - one that consistently displays the problem and one that does not.
2) Bit by bit, you must comment-out code from the problem page (whilst still validating). However, since it may be a combination of factors, even this may not yield a reliable answer.

Something to consider - it's well known that IE has box-model problems (fixed from IE 6 onwards for newer doctypes) however, it can still have problems determining whether scrollbars are needed or not. Maybe, the flash occurs when it takes this decision - you could try using embedded CSS to force this decision to be taken early.

It's also possible that this can't be fixed...
Before a window is painted it is erased. If IE performs the erase operation using the default window color (normally white) and then refills it when the paint operation is performed, then absolutely nothing will reliably fix this problem (since only speed will hide it).

Kaled.