2009
04.27

FOUC (or Flash of Unstyled Contents) is where the page loads the boring normal text for a split second each page before it gets replaced with the proper text.  Which looks a bit crap.

Luckily the fix is ridiculously simple.  This usually occurs in IE, but this may fix it for other browsers also. Simply put:

<script type=”text/javascript”>
Cufon.now(); <!– avoid the fouc in ie with cufon –>
</script>

Somewhere just before the closing </body> tag and the problem is solved.  If only everything in life was that simple :)

3 comments so far

Add Your Comment
  1. Who ate all the pie’s , who ate all the pies’ la la la la la la la la la
    pie boy

  2. Thanks. This only works if the base Cufon JS is placed in the header secion of your site. If, e.g. for performance reaons, your scripts are loaded at the end of your document, this doesnt fix.

  3. works great one first load on my site, but when i refresh it, it breaks again… i don’t know how many folks refresh the page.. so im not worried, but being a web design company you’re page shouldn’t break ;)