Is there a way to minimize or hide the screen when it is loaded?

Asked 1 years ago, Updated 1 years ago, 136 views

■ Questions
I'm very sorry for the rough question, but

About the HTML file that was transitioned in the HTTP request. Is it possible to minimize or hide the screen when loading?

■How to try so far
 ·Minimize
  
with javascript embedded in HTML   

   
      window.minimize();
 
  

■Background

Because the screen is displayed only for a moment to perform the post-transition processing. I think it would be better to minimize it or hide it, so I'm thinking about implementing it like this.

Thank you in advance.

javascript html internet-explorer

2022-09-30 17:27

1 Answers

I think it would be easy to leave the page to be loaded hidden in CSS and display it after the process is complete.

<body id="body" style="visibility:hidden;">
 <main>aaa</main>
</body>

<script type="text/javascript">
// Displayed after 3 seconds
setTimeout(function(){
  console.log("done");
  const body = document.querySelector("#body");
  body.style.visibility="visible"
}, 3000);
</script>

window.minimize doesn't seem to be implemented with a modern browser


2022-09-30 17:27

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.