RE: [Resource Hints] Negative Hints


  I agree, checking document.visibilityState for 'prerender' addresses JavaScript based no-prerender scenarios.  Checking for 'hidden' is a mostly functional equivalent.

  However, using document.visibilityState puts the onus on the script author rather than the web site owner – and these two mightn’t be one and the same.  Additionally, having prerender control exclusively available in JavaScript promotes the use of JavaScript over HTML, even when HTML might otherwise be a better option.


From: Philip Tellis []
Sent: Monday, April 24, 2017 1:17 PM
To: Brendan Riordan-Butterworth <>
Subject: Re: [Resource Hints] Negative Hints

If these resource requests are initiated from JavaScript, then that JavaScript should just use document.visibilityState to determine if the beacons or ad iframes should be requested or not.  This is what boomerang has been doing for several years to good effect.

On Mon, Apr 24, 2017 at 12:52 PM, Brendan Riordan-Butterworth <<>> wrote:
Resource hints present a thoughtful and balanced means for web sites to inform web clients about opportunities to speed presentation of resources to the user.  However, when directing a web client to prefetch or prerender a resource with sub-resources (like scripts or images on an HTML page), there’s no obvious method of excluding some of these sub-resources from being prefetched or prerendered.

It’s my opinion, as an expert in the digital advertising supply chain technology, that some sub-resources shouldn’t be prefetched or prerendered.  Resources that should not be prefetched include most if not all static images that are web beacons, and some advertising iframes.  Resources that should not be prerendered include a wide range of time-sensitive advertising and web-analytics related scripts.

Motivated by Firefox’s move to enable predictive prefetch<>, the ad industry is looking for a means to identify links to sub-resources that should not be requested while the parent resource is in the prefetch or prerender context.

I suggest that two additional resource hints be defined to allow sub-resources that should not be requested while in the prefetch and prerender contexts: no-prefetch and no-prerender.  Suggested text appears at the end of this message.

The ability to exclude sub-elements from a prefetch or prerender increases the opportunities for a web site to suggest a prefetch or prerender.  It also heads off the need to develop more complex scripting by ad and analytics systems to detect and handle an early (and, potentially, false) impressions.

Rough suggested text:

2.5 No-Prefetch

The no-prefetch link relation type is used to identify a resource that should not be fetched as a part of a resource that is being prefetched or prerendered.

<link rel="no-prefetch" href="//<>">

The user agent should not fetch resources identified as no-prefetch until the next navigation has shown actual need for the resource.

2.6 No-Prerender

The no-prerender link relation type is used to identify a resource that should not be fetched and executed as a part of a resource that is being prerendered.

<link rel="no-prerender" href="//<>">

The user agent may prefetch the resource but should not execute it.


Brendan Riordan-Butterworth
Senior Director, Technical Standards
IAB Tech Lab
(212) 609-3734<tel:(212)%20609-3734><>


Received on Monday, 24 April 2017 18:01:02 UTC