apply_filters( ‘exit_on_http_head’, bool $exit )

In this article

Filters whether to allow ‘HEAD’ requests to generate content.

Description

Provides a significant performance bump by exiting before the page content loads for ‘HEAD’ requests. See #14348.

Parameters

$exitbool
Whether to exit without generating any content for 'HEAD' requests. Default true.

Source

if ( 'HEAD' === $_SERVER['REQUEST_METHOD'] && apply_filters( 'exit_on_http_head', true ) ) {

Changelog

VersionDescription
3.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.