diff --git a/web/src/basic/CustomHead.js b/web/src/basic/CustomHead.js index 6578a863..c0f9d538 100644 --- a/web/src/basic/CustomHead.js +++ b/web/src/basic/CustomHead.js @@ -14,9 +14,11 @@ import {useEffect} from "react"; +let customHeadLoaded = false; + function CustomHead(props) { useEffect(() => { - if (!sessionStorage.getItem("customHead")) { + if (!customHeadLoaded) { const suffix = new Date().getTime().toString(); if (!props.headerHtml) {return;} @@ -40,7 +42,7 @@ function CustomHead(props) { } document.head.appendChild(innerNode); }); - sessionStorage.setItem("customHead", "true"); + customHeadLoaded = true; } }); }