public
Last active

Prevent FOUC

  • Download Gist
gistfile1.html
HTML
1 2 3 4 5 6 7 8 9
<!-- Prevent FOUC (flash of unstyled content) - http://johnpolacek.com/2012/10/03/help-prevent-fouc/ -->
<style type="text/css">
.no-fouc {display: none;}
</style>
 
<script type="text/javascript">
document.documentElement.className = 'no-fouc';
// add to document ready: $('.no-fouc').removeClass('no-fouc');
</script>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.