Last active
December 19, 2015 15:09
-
-
Save adactio/5974197 to your computer and use it in GitHub Desktop.
I'd like to know if browsers that have a "look ahead" pre-parser for images will start downloading foo.png ...even if they support svg.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<title>Test</title> | |
<object data="foo.svg" type="image/svg+xml"> | |
<img src="foo.png"> | |
</object> |
@adactio all browsers have look ahead logic nowadays.. So I'm not sure what / why the focus on that specifically.
Having said that, using @csswizardry's example, WPT run for Chrome: http://www.webpagetest.org/result/130711_N3_607c236d5ac69b627969bc249d407b95/1/details/ (yes, it downloads the png)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A look at the waterfall chart shows that Chrome certainly appears to download both. I made a really crude demo out of some images I grabbed off my site: http://jsfiddle.net/csswizardry/JwmAP/show/