You could use JavaScript to save a flag value in localStorage then, if the value exists you can set the div properly.
See the localStorage api at:
Window.localStorage - Web APIs | MDN[
^]
localStorage.setItem("makeDiv1st","my-divId");
Then next time page loads you check the value:
let targetDivId = localStorage.getItem("makeDiv1st");
This should all probably be done without the page refresh but this is one workaround that may work for you.