javascript flash of unstyled content

I’ve been trying to put <script> tags near </body> for performance. However, this causes a “flash of unstyled content” while content that is hidden by javascript is loaded but hasn’t been taken over by javascript. One option is use display:none to hide the content, but that is not very unobtrusive.

Put this snippet in <head>, and the rest of your javascripts just before </body>.

Comments
Filed ↓ javascript