Как сделать показ Preloader один раз?
Preloader при каждом обновлении страницы показывается.Как сделать так чтобы только один раз при посещении страницы показался?
var hellopreloader = document.getElementById("hellopreloader_preload");
function fadeOutnojquery(el) {
el.style.opacity = 1;
var interhellopreloader = setInterval(function() {
el.style.opacity = el.style.opacity - 0.05;
if (el.style.opacity <= 0.05) {
clearInterval(interhellopreloader);
hellopreloader.style.display = "none";
}
}, 16);
}
window.onload = function() {
setTimeout(function() {
fadeOutnojquery(hellopreloader);
}, 1000);
};
#hellopreloader>p {
display: none;
}
#hellopreloader_preload {
display: block;
position: fixed;
z-index: 99999;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #f22613;
background-size: 69px;
}
.preloader_block {
position: relative;
top: 40%;
left: 0;
background-image: url(https://demo.mygabrielyan.ru//wp-content/themes/dvk_theme/assets/images/circles.svg);
background-position: center;
background-repeat: no-repeat;
background-size: 100% 100%;
height: 30%;
}
.preloader_block a {
position: absolute;
top: -90%;
left: 21%;
}
<div id="hellopreloader">
<div id="hellopreloader_preload">
<div class="preloader_block">
</div>
</div>
</div>