Bug 93003
Summary: | about:blank entries in Network Requests for iframes with no src tag | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jonathan Zuckerman <j.zuckerman> |
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
Status: | UNCONFIRMED | ||
Severity: | Minor | ||
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | http://brokendisk.com/misc/srcless_iframes.html |
Jonathan Zuckerman
I am testing this on Mac OSX 10.7, in Webkit 537+
(this maaay be better classified as an Inspector issue but I'm filing it here first)
One strategy for lazy-loading content in a web app is to not specify a "src" attribute for iframes (for example the Youtube HTML5 Iframe Player) until the user has indicated that they would like to view the content in that particular frame. At the time the user elects to view the video, the "src" attribute can be added in order dynamically to load the content in the browser.
According to the HTML5 spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-src
The "src" attribute of an iframe is optional and so the presence of an iframe does not necessarily suggest that an extra network request will be incurred.
In WebKit creating an iframe with no src attribute results in an entry in the Network Requests that looks like this:
Name: about:blank
Domain: --
Type: Document
Status: --
Cached: No
Size: --
Transferred: --
Latency: 0.4ms
Duration: 5.6ms
I'm sure that it's a pretty trivial impact on the total page load time to register these requests and then discard them (there is no Response..), but it seems to me like it can be optimized ever so slightly to not create the entries at all.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |