Purpose

The HTTP Purpose request header is an optional and unofficial HTTP header, used to indicate that the HTTP request is a prerender request rather than from normal browsing.

Usage

The prerender mechanism is part of the resource hints framework and is used to identify resources that can be used by the next user action to be fetched . This allows the user agent to deliver a faster response when the resource is actually requested by the user. Webmasters can add this to their website using the Link header.

In order to make a HTTP request due to the prerender mechanism distinguishable from a HTTP request when normal browsing by a user, the Purpose header is added to the HTTP request by the browser with the value prefetch.

Example

Response

Purpose: prefetch

Takeaway

The HTTP Purpose request header is an unofficial HTTP header and can be used by browsers to identify the resource to be requested by the browser's prerender mechanism.

See also

Last updated: July 6, 2022