[Resource Hints] Negative Hints

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<https://www.fxsitecompat.com/en-CA/docs/2017/predictive-prefetch-makes-duplicate-http-requests-in-iframes-causing-false-ad-impressions/>, 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.

EXAMPLE 5
<link rel="no-prefetch" href="//example.com/timesensitivebeacon.gif">

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.

EXAMPLE 6
<link rel="no-prerender" href="//example.com/analytics.js">

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

/brendan.

Brendan Riordan-Butterworth
Senior Director, Technical Standards
IAB Tech Lab
(212) 609-3734
brendan@iabtechlab.com<mailto:brendan@iabtechlab.com>

Received on Monday, 24 April 2017 17:01:40 UTC