tags:

views:

81

answers:

1

What would cause a brief flash of white screen while a PHP page is loading? I just noticed it today on a WordPress theme that I am building and am wondering if this is a cause for concern. As a page loads, the screen will flash white before showing the page content. Sometimes this happens on every single page load, other times it only happens intermittently.

A: 

Sounds like FOUC perhaps.

Does the same thing happen when you disable stylesheets?

alex
Hmm i think you might be right. I disabled the stylesheet and it doesn't happen. I have a jQuery tabbed sidebar which I've set to hide via CSS until the page finishes loading. But then I moved another bit of code to an external file and am calling it via a function. Maybe that's slowing the page load down a bit? I don't see why the entire screen would be white though, when there's only one jQuery element on the page.
orbit82
I could only guess more... if you have it online I'll take a look.
alex
Alex, the URL is http://www.pixelplanemedia.com/citizenpress/demo if you want to take a look. Click through the site and the pages will randomly flash white before loading.
orbit82
Oh and the white flashes happen even if I disable CSS. I know I said that it wasn't happening before, but now it is. So it has to be PHP related.
orbit82
@orbit82 I get an error when trying to access it... headers already sent.
alex
Hi Alex, I fixed that error. It was due to extra white space in one of the files. Now the page does not flash at all in Firefox, but it still flickers in Safari, Chrome and other Web Kit browsers. Not sure about IE.
orbit82