Safari Mobile: How do I prevent flash of white on page load?

849 Views Asked by At

When HTML5 pages load in Safari mobile, there is a split-second flash of white before the content displays. Sort of like the old' "flash of unstyled content (FOUC)" problem, but with a white screen instead... call it a "flash of white (FOW)" problem.

Anyone else seen this? How can I get rid of it? I've tried everything I can think of:

  1. Setting the body background color to black, at the top of my first style sheet.

  2. Setting the body background color to black, way up in the head, with a separate style tag:

    <style type="text/css">
        body {background: black }
    </style>
    
  3. In my desperation, I even resorted to adding (gasp!) an inline style to the tag:

    <body style="background: black">
    

Nothing seems to work... I get this annoying flash of white every time I load a page.

Any ideas? Thx, Keith :^)

0

There are 0 best solutions below