Some time ago I came across the need for a no-op URL that would do nothing when loaded. The original use-case was an
<iframe> that needed to have its
[src] attribute cleared to avoid an obscure browser bug.
Another developer had originally used
http://google.com, however google is not an acceptable "null" url.
http://example.com is another poor choice.
I had considered using an empty source:
iframe.src = '';
which for an
<iframe> would work, however as a general-purpose "null" URL it has issues.
For example, if you set the
'' you will reload the current page, rather than clearing it.
A good choice for a "null" url is
The default behavior for browsers navigating to
about:blank is to create an empty document in the current site context, without needing to make any web requests for the content, because there isn't any content.