No, it is incorrect to specify an empty iframe src.
You should use <iframe src="about:blank" /> .
# is a link to the binding to the current page (or is often used as a routing scheme when working with AJAX requests). Using it as an iframe source would be pointless since the iframe does not link to the content on the current page and is not used with AJAX requests.
about:blank is a cross-browser standard for displaying a blank document.
June 8, 2012 update:
It seems that the 'living' spec no longer renders the iframe invalid if the src attribute is missing:
If, when the element is created, the srcdoc attribute is not set and the src attribute is also not set or not set, but its value cannot be resolved, the browsing context will remain on the initial about: blank page.
If both of these attributes are not set, the default view context will be about:blank . To ensure proper backward compatibility, it is recommended that you be verbose and provide the about:blank URL for now.
Aron Rotteveel May 10 '11 at 7:32 a.m. 2011-05-10 07:32
source share