Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does about:blank work in all browsers?

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?

like image 303
NibblyPig Avatar asked Nov 10 '10 14:11

NibblyPig


People also ask

Is about blank malware?

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.

Why is about blank blocked Chrome?

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.

Is about blank a valid URL?

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.

How does about blank work?

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.


2 Answers

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)

like image 98
Peter Jacoby Avatar answered Nov 07 '22 17:11

Peter Jacoby


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).

like image 20
Konrad Borowski Avatar answered Nov 07 '22 17:11

Konrad Borowski