Detect if browser supports data uri scheme with iframes
问题 Internet Explorer does not support the data uri scheme for iframe urls (see http://msdn.microsoft.com/en-us/library/cc848897%28v=vs.85%29.aspx). Other browsers do. As browser detection is loaded with testing and future-proofing problems, I want to use feature detection to work around this issue. So: how can I detect whether or not a browser supports the data uri scheme for iframes? 回答1: This solution by Kevin Martin is tested and seems to be giving the correct result in IE, FF and Chrome: