Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strike>I haven't done this in a while, but I had to go through this same thing once.</p> <pre><code>&lt;img src="about:blank" alt="" /&gt; </code></pre> <p>Is my favorite - the <code>//:0</code> one implies that you'll try to make an HTTP/HTTPS connection to the origin server on port zero (the tcpmux port?) - which is probably harmless, but I'd rather not do anyways. Heck, the browser may see the port zero and not even send a request. But I'd still rather it not be specified that way when that's probably not what you mean.</p> <p>Anyways, the rendering of <code>about:blank</code> is actually very fast in all browsers that I tested. I just threw it into the W3C validator and it didn't complain, so it might even be valid.</strike></p> <p><strong>Edit</strong>: Don't do that; it doesn't work on all browsers (it will show a 'broken image' icon as pointed out in the comments for this answer). Use the <code>&lt;img src='data:...</code> solution below. Or if you don't care about validity, but still want to avoid superfluous requests to your server, you can do <code>&lt;img alt="" /&gt;</code> with no src attribute. But that is <em>INVALID</em> HTML so pick that carefully.</p> <p><strike>Test Page showing a whole bunch of different methods: <a href="http://desk.nu/blank_image.php" rel="nofollow">http://desk.nu/blank_image.php</a> - served with all kinds of different doctypes and content-types.</strike> - as mentioned in the comments below, use Mark Ormston's new test page at: <a href="http://memso.com/Test/BlankImage.html" rel="nofollow">http://memso.com/Test/BlankImage.html</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload