- From: David Young <dyoung@pobox.com>
- Date: Thu, 2 Apr 2015 00:35:33 -0500
- To: whatwg@lists.whatwg.org, WHATWG <whatwg@whatwg.org>
On Mon, Mar 30, 2015 at 03:47:26PM -0700, Seth Fowler wrote: > I think we should modify the Page Visibility spec to let UA’s take > actual visibility of iframes into account when deciding if an iframe > is hidden. > > Right now, the visibility of an iframe is the same as that of the top > level browsing context it’s embedded in. Here are the details: > > http://www.w3.org/TR/page-visibility/ > > This design doesn’t do much for iframes which may be doing > significant work, though. The most obvious example is HTML5 ads. These > ads may be performing significant work - computation, network IO, > rendering, etc. Some or all of that work is often unnecessary when > the ad is outside the viewport. Having an API that would allow those > ads to throttle back their work when they’re not visible could have > significant positive effects on performance and battery life. I am concerned that if an iframe is "on its honor" to use the API, the API will have a very small impact, when mandatory resource arbitration seems to be needed. Responsibility for good performance and battery life on my laptop should belong to my UA, not to the web developer. I cannot take for granted the good will of the web developer, and even developers with good intentions may make a mistake or cut corners. It seems to me that the UA should divvy up resources among iframes based on the availability of an *audience* to each one. Invisible pages, occluded iframes, iframes that have scrolled out of the viewport, and so on, definitely shouldn't get a prime share unless the user has made an explicit grant. Give the bulk of the resources to what you could conceivably be looking at. Do you see what I'm getting at? Dave -- David Young dyoung@pobox.com Urbana, IL (217) 721-9981
Received on Thursday, 2 April 2015 05:36:00 UTC