apply_filters( 'nocache_headers', array $headers )
Filters the cache-controlling headers.
Description Description
See also See also
Parameters Parameters
- $headers
-
(array) Header names and field values.
- 'Expires'
(string) Expires header. - 'Cache-Control'
(string) Cache-Control header.
- 'Expires'
Source Source
Changelog Changelog
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
// define the nocache_headers callback function remove_nocache_headers( $headers ) { // make filter magic happen here... return $headers; }; // add the filter add_filter( 'nocache_headers', 'remove_nocache_headers', 10, 1 );Typically, you can call WordPress’ nocache_headers() function when you don’t want content to be cached.