Preload status bar images

These are used via CSS, which means the browser doesn't load them until
an element actually gets those CSS rules. There can be some delay to
this loading which causes visual glitches. By preloading we can make
sure those images are cached and ready when the status bar appears.
This commit is contained in:
Pierre Ossman 2021-09-24 16:15:31 +02:00
parent bfefd81d4c
commit ff077f4656
1 changed files with 5 additions and 0 deletions

View File

@ -50,6 +50,11 @@
<!-- Stylesheets --> <!-- Stylesheets -->
<link rel="stylesheet" href="app/styles/base.css"> <link rel="stylesheet" href="app/styles/base.css">
<!-- Images that will later appear via CSS -->
<link rel="preload" as="image" href="app/images/info.svg">
<link rel="preload" as="image" href="app/images/error.svg">
<link rel="preload" as="image" href="app/images/warning.svg">
<script src="app/error-handler.js"></script> <script src="app/error-handler.js"></script>
<script type="module" crossorigin="anonymous" src="app/ui.js"></script> <script type="module" crossorigin="anonymous" src="app/ui.js"></script>
</head> </head>