Flash of unstyled content FOUC
-
Tabs are affected by a flash Of Unstyled Content (FOUC) on page load. It’s mostly only a problem when a tab is required above the fold, but unfortunately, that’s where we need them on many of our pages. But the FOUC issue is visible on any site/page if you refresh the page with tabs inside the viewport (including the tabby demo page).
I’m curious of this line in the page html…
<script>window.addEventListener('DOMContentLoaded', function() {jQuery(document).ready(function($) { RESPONSIVEUI.responsiveTabs(); })});</script>
This appears to be calling for tabs content to draw when the html has loaded but before tabbys stylesheet has loaded? Where we actually need the stylesheet loading earlier so it’s ready for the content and eliminates the FOUC?
We’re hiding the fouc for now by adding a fade in animation to the tabs, but animations aren’t fitting the site design or topic very well.
Thanks for looking
- The topic ‘Flash of unstyled content FOUC’ is closed to new replies.