WC_Cache_Helper::additional_nocache_headers( array $headers )

Set additional nocache headers.


Description Description


Parameters Parameters

$headers

(Required) Header names and field values.


Top ↑

Source Source

File: includes/class-wc-cache-helper.php

	public static function additional_nocache_headers( $headers ) {
		// no-transform: Opt-out of Google weblight if page is dynamic e.g. cart/checkout. https://support.google.com/webmasters/answer/6211428?hl=en.
		$headers['Cache-Control'] = 'no-transform, no-cache, no-store, must-revalidate';
		return $headers;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.6.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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