-
Notifications
You must be signed in to change notification settings - Fork 39
flash of original text #3
Comments
+1 for @bmuller's solution |
He could have a style node with * {
opacity: 0;
transition: opacity 0.3s;
} and javascript could change opacity to 1 when done... nice little fade in. |
Simplest solution would be just to move the <script> node to the top of the page; that gives you a lot of flexibility about how to deal with it— for example, you could document.write in a hide-all CSS rule, and also register a handler for the document.load event. |
This is also known as a FUOC (Flash Of Unstyled Content) - http://en.wikipedia.org/wiki/Flash_of_unstyled_content |
Similar-looking symptom, but very different cause— a FOUC is HTML which is shown without CSS. This is markdown which is shown prior to the Javascript template processing. |
bump. |
Like @mikepurvis said, moving the The first thing we do when Jr loads is to hide the body, show the spinner, load the rest of the assets, convert to HTML, then show the finalized document. We could follow @JAStanton's advice and insert another |
if i move the script tag to the top, nothing is rendered -- i just see the markdown. i guess something else is needed too. |
Confirm the simply moving |
You should load the JS first, hide the body, then render, then show the body - so you don't see the flash of the plain text on load.
The text was updated successfully, but these errors were encountered: