Author Topic: white flicker  (Read 499 times)

Offline CygnusX

  • Level 24
  • *
  • Posts: 303
  • Reputation: +3/-2
    • View Profile
    • Lords of Midnight
white flicker
« on: January 25, 2011, 09:38:42 AM »
I have a site with a predominately black background.  When navigating between pages, the web browser will often display a full white screen before loading the black background.  Any ideas on how this can be avoided?

Answers containing Ajax, etc are not desired.  I already have the body background set to #000000.

I'm thinking this is perhaps why people have stopped using black background sites.

Offline Harkins

  • Level 28
  • **
  • Posts: 424
  • Reputation: +11/-2
  • Coder, blogger, entrepreneur.
    • View Profile
    • Push CX - Blog
Re: white flicker
« Reply #1 on: January 25, 2011, 10:16:27 AM »
This is the 'flash of unstyled content' bug, often abbreviated 'fouc'. The browser is starting to render the page before it's loaded all the CSS assets. You need to include your CSS in the <head> tag using a <link> tag.

If it's still happening and you don't want to track it down, you can hack around it by changing your body tag to say <body style="background-color: #000">.

But sites with black backgrounds are getting less and less popular because they're harder to read and lots of audiences (older people, women) find them off-putting, which may or may not be OK depending on your theme.

Visit #bbg on irc.freenode.net to talk browser games anytime.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal