fix(css): load css before js

Currently all.css is loaded after app.js. This means there may
not be a guarantee that the css is loaded before the js, which
is bad because the js does dom querying for sizes on elements,
but some element sizes will be affected by js. So instead load
css upfront and let the browser block as needed or at least
give the css a head start in racing javascript to load.
This commit is contained in:
Leonard Kim 2017-11-28 11:05:40 -08:00 committed by yanas
parent b258a9fc5e
commit b74b29e8a0
2 changed files with 6 additions and 2 deletions

View File

@ -4,6 +4,9 @@
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--#include virtual="base.html" -->
<link rel="stylesheet" href="css/all.css">
<script>
window.indexLoadedTime = window.performance.now();
console.log("(TIME) index.html loaded:\t", indexLoadedTime);
@ -134,7 +137,6 @@
<script src="libs/lib-jitsi-meet.min.js?v=139"></script>
<script src="libs/app.bundle.min.js?v=139"></script>
<!--#include virtual="title.html" -->
<link rel="stylesheet" href="css/all.css">
<!--#include virtual="plugin.head.html" -->
</head>
<body>

View File

@ -4,6 +4,9 @@
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../" />
<link rel="stylesheet" href="css/all.css">
<!--#include virtual="/title.html" -->
<script><!--#include virtual="/interface_config.js" --></script>
<script>
@ -11,7 +14,6 @@
</script>
<script src="libs/lib-jitsi-meet.min.js?v=139"></script>
<script src="libs/device_selection_popup_bundle.min.js?v=1"></script>
<link rel="stylesheet" href="css/all.css">
</head>
<body>
<div id="react"></div>