How to set current page approximately: blank using JavaScript?

I have a situation where the server may not be available at the current address, so I want to detect this and redirect the page to a blank page.

How do I do this using JavaScript?

+4
source share
2 answers
window.location.href="about:blank"; 
+12
source

You can simply use:

 window.location.href="about:blank"; 
0
source

Source: https://habr.com/ru/post/1390733/


All Articles