The Subtleties of Fetching Images in Web Browsers
Posted on January 26th, 2009 | 2 Comments »
Because HTML is to web browsers what mountains are to mountain bikes (i.e. the former gives purpose to the latter), and being a web designer and developer myself, I like to track what’s going on in the world of HTML almost as much as I like tracking web browsers. Therefore, I’ve been keeping tabs on the goings-on over at The WHATWG Blog, in an attempt to follow the latest developments with the next major version of HTML, HTML 5. In doing so, I stumbled upon an interesting bit of information on how web browsers handle the src attribute of an img tag in a recent post:
The problem stems from the following (arguably pointless) markup:
<img src="">A fair number of web pages actually try to declare an image with an empty src attribute. According to the HTTP and URL specifications, this markup means that there is an image at the same address as the HTML document — a theoretically possible but highly unlikely scenario. Internet Explorer apparently catches this mistake and just silently drops the image. Other browsers do not; they will actually try to fetch the image, which results in a “duplicate” request for the page (once to successfully retrieve the page, and again to unsuccessfully retrieve the image).
Apparently some additional language has been added to the HTML 5 specification to make it clear to the developers of user agents (i.e. web browsers) that “ignored self-references” can be safely ignored, therefore making Internet Explorer’s behavior the right behavior according to the spec.
If you’re interested in these bleeding edge changes to the HTML 5 specification and the impact they have on web browsers of the future, I highly recommend following The WHATWG Blog. I’m also interested in knowing if the audience here (if there still is one
) is interested in reading about these types of things here at Browsersphere.
Tags: HTML, HTML5, Internet Explorer, Specifications, WHATWG
2 Responses
Using
Mozilla Firefox 3.0.5 on
Windows XP
There is still an audience here. What I like about your blog is that it is HTML5/CSS related info applied to webbrowser (The Whatwg blog is much more abstract) *and* browser agnostic (not the point of view of Microsoft, Mozilla, Opera or Google, which is much narrower).
And that’s unique.
Using
Mozilla Firefox 3.1b2 on
Windows XP
Thanks for the comment, Reader. I appreciate the feedback. I’ve certainly got my biases, but I try not to let them show here too much.