Explore topics

Move CSS from Header to Head

Issues background

CSS was loaded a bit more slower compared to the page causing the bare HTML was loaded first and user can see the glimpse of the bare HTML page for a split second.

The CSS file was already optimised thru minify and remove unused element.

Fixes for the issues

Prioritise CSS loading thru by linking the stylesheet in head instead of header element.

Stylesheet in head.

<head>
    <link href='/css/base.css' rel='stylesheet'>
</head>

Stylesheet in header.

<body>
    <header>
        <link href='/css/base.css' rel='stylesheet'>
    </header>
</body>

Published on