nocache_headers()

最后更新于:2021-11-27 17:49:35

nocache_headers()

Set the headers to prevent caching for the different browsers.

源文件

文件: gc-includes/functions.php

function nocache_headers() {
	if ( headers_sent() ) {
		return;
	}

	$headers = gc_get_nocache_headers();

	unset( $headers['Last-Modified'] );

	header_remove( 'Last-Modified' );

	foreach ( $headers as $name => $field_value ) {
		header( "{$name}: {$field_value}" );
	}
}