how to load css before page load

Each network call takes one second. This is highly simplified points :

  • If we call the CSS file first, the browser will get the CSS in one second.
  • If we call the javascript first, the browser will get the CSS in two seconds (one second to retrieve the javascript + one second to retrieve the CSS).
  • If we call the javascript and the image before the CSS then the browser will get the CSS in three seconds.

This needed because the browser can not display anything at all until it first has the CSS.

Page content sequence:

  1. CSS
  2. IMG
  3. JS


Leave a Reply