Reverted async image loading error load, because it does not significantly improves the page loading speed and dosn't work for old browsers
parent
1c13904e05
commit
6fc7f9a8dc
|
@ -374,13 +374,3 @@ export const templates = template_loader;
|
|||
clog("%c ", display_detect);
|
||||
}
|
||||
}
|
||||
|
||||
/* Loading error image (async) */
|
||||
const init_error_image = () => {
|
||||
const node = document.getElementById("load-error-image");
|
||||
const image = document.createElement("img");
|
||||
image.src = node.getAttribute("x-src");
|
||||
image.style.height = "12em";
|
||||
node.replaceWith(image);
|
||||
};
|
||||
setTimeout(init_error_image, 100);
|
|
@ -144,8 +144,7 @@ var initial_css;
|
|||
<!-- Critical load error -->
|
||||
<div class="fulloverlay" id="critical-load">
|
||||
<div class="container">
|
||||
<!-- We're loading the error image via JS so improve first page content loaded speed -->
|
||||
<div id="load-error-image" x-src="img/loading_error_right.svg"></div>
|
||||
<img src="img/loading_error_right.svg" style="height: 12em" />
|
||||
|
||||
<h1 class="error" style="color: red; margin-bottom: 0"></h1>
|
||||
<h3 class="detail" style="margin-top: .5em"></h3>
|
||||
|
|
Loading…
Reference in New Issue