0

If using let's say

<object type="image/svg+xml" src...>
    <img type="png" src... />
</object>

the back up image (here the png) doesn't create a second http request or does it?

My doubt comes from using a couple of testing sites, like the www.pingdom.com full page test for speed, each reserve image was listed as causing an extra http request.

Is this the case?

EDIT I've been looking into this, and I'd like confirmation or even better a way to avoid these possibly useless requests, but it seems that yes back-up objects do require HTTP requests, the browser distinguishes the resources but the HTTP doesn't, it just gets them and tells the browser "Sort this lot out." Hmmm...

I can't see a way around this (I have 20+ svgs on some pages, pages that i'd like to be as small as poss for mobile), i'll have to make those with non-svg browsers click twice rather than make everyone else have a slower experience....


HTTP requests are created by each <object> back up or primary, the browser will then handle your html.

4

1 回答 1

0

HTTP 请求由每个 <object>备份或主创建,然后浏览器将处理您的 html。

于 2012-09-11T10:01:51.357 回答