Move CSS link tags above JS in the head

CSS are blocking resources, so keeping them below JS delays
rendering of the page. CSS should be loaded ASAP.
This change speeds up first contentful paint by 0.2s on localhost.
The slower the device, the bigger the difference could be.
This commit is contained in:
Paweł Kowalski 2020-11-17 04:26:37 +01:00 committed by Robin Ward
parent 8619c1fd47
commit 96aca6d994
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,8 @@
<%= render partial: "layouts/head" %>
<%= discourse_csrf_tags %>
<%= render partial: "common/discourse_stylesheet" %>
<%- if SiteSetting.enable_escaped_fragments? %>
<meta name="fragment" content="!">
<%- end %>
@ -51,7 +53,6 @@
<meta name="apple-itunes-app" content="app-id=<%= SiteSetting.ios_app_id %><%= ios_app_argument %>">
<%- end %>
<%= render partial: "common/discourse_stylesheet" %>
<%= yield :head %>