I have an iframe and I want to clear it, so I set its src to about:blank
Then I wondered, does this work in all browsers?
About:blank isn't a form of malware, and there's no such thing as an aboutblank virus, so the About Blank page itself is no cause for concern. But malware can cause it to appear more often as your browser defaults to a blank link to protect against computer viruses.
If you see “about:blank” in your web browser's address bar, you're viewing an empty page built into your web browser. It's a part of Google Chrome, Mozilla Firefox, Apple Safari, Microsoft Edge, Internet Explorer, and other browsers. There's nothing wrong with about:blank.
It is not an officially registered scheme, and has no standard syntax. There is no guarantee this will be accepted as a valid URL by all clients.
About:blank is a page that appears when your browser has nothing else to display. It's not a page on the internet, but rather something internally inside your browser. The "about" part of what you see comes from your browser's about URI or URL scheme.
One thing to be aware of is that if you are running a website in https, you need to be careful about blanking out an iframe. about:blank
is a non-secure page and so the browser will throw an error to the user that there are non-secure sections of the page if you have an iframe sourced to about:blank.
(Not exactly an answer to your question, but I thought it was worth mentioning)
It's a requirement for HTML5 implementations to support about:blank
. Also, about:blank
is defined by RFC 6694.
As for non-HTML5 web browsers, it depends. WorldWideWeb, Lynx, and some other browsers don't support about:blank
– it wasn't a standard then. The about:blank
itself initially appeared in Netscape Navigator 1. Internet Explorer copied that feature from Netscape, and other browsers copied it as well. If the browser supports frames, you can be almost sure it supports about:blank
. Otherwise websites using frames with about:blank
location created when Netscape was popular would show errors (or not show them, and effectively do what you wanted).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With