Skip to content

Instantly share code, notes, and snippets.

@adactio
Last active December 19, 2015 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adactio/5974197 to your computer and use it in GitHub Desktop.
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.
<!DOCTYPE html>
<title>Test</title>
<object data="foo.svg" type="image/svg+xml">
<img src="foo.png">
</object>
@csswizardry
Copy link

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

@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