Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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.
<!DOCTYPE html>
<title>Test</title>
<object data="foo.svg" type="image/svg+xml">
<img src="foo.png">
</object>
@csswizardry
Copy link

csswizardry commented Jul 11, 2013

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/

@igrigorik
Copy link

igrigorik commented Jul 11, 2013

@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