How-to: Fix the flash on page load 3.2.x (FOUC)
-
Hi Guys,
It looks like they have found an answer over on the Artisteer forum to the page load flash that some websites are getting.This is the fix from their topic for the twenty ten or twenty eleven based themes.
Steps:
Create an empty file in the themes folder, print.css, this is an epmty file to stop log errors.Then in header.php find the line:
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
Add a new line after to load the empty stylesheet.
<link rel="stylesheet" type="text/css" media="print" href="<?php echo get_stylesheet_directory_uri() .'/print.css'; ?>" />
So you should now have these lines and no flashing on page load, why it works no one knows, but it does!
<link rel="profile" href="https://gmpg.org/xfn/11" /> <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" /> <link rel="stylesheet" type="text/css" media="print" href="<?php echo get_stylesheet_directory_uri() .'/print.css'; ?>" /> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
If you are using a page cache, you might need to clear this for the change to work.
Thanks and respect to the guys on the Artisteer forum!
David
- The topic ‘How-to: Fix the flash on page load 3.2.x (FOUC)’ is closed to new replies.