Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set the current page to about:blank using JavaScript?

I have a situation where the server may not available on the current address, so I want to detect that and redirect the page to an about:blank page.

How would I go about doing that using JavaScript?

like image 988
Schu Avatar asked Jan 12 '12 22:01

Schu


People also ask

How do I change about blank?

In Google Chrome, head to menu > Settings. Scroll down to the “On startup” section and select either “Open the New Tab page” or delete about:blank from the web pages that open on startup and choose your favorite web page.

Why do I get a blank page when I click on a link?

But it could be a sign that your computer is blocking malware. So they can be related. Some anti-virus and anti-malware software use about:blank when they detect a bad URL or site. So instead of directing you to that malicious site, the browser throws up that blank page to protect you.

What does blocked blank mean?

“about:blank” is a blank page built into your web browser displayed when there's nothing else to show. It's not malware but can result from malware being removed. “about:blank#blocked” is sometimes displayed as the result of security software blocking access to something.


1 Answers

window.location.href="about:blank";
like image 153
Eugen Rieck Avatar answered Oct 12 '22 01:10

Eugen Rieck