bbp_ajax_headers()

Send headers for AJAX specific requests


Description Description

This was abstracted from bbp_do_ajax() for use in custom theme-side AJAX implementations.


Source Source

File: includes/common/ajax.php

function bbp_ajax_headers() {

	// Set the header content type
	@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
	@header( 'X-Robots-Tag: noindex' );

	// Disable content sniffing in browsers that support it
	send_nosniff_header();

	// Disable browser caching for all AJAX requests
	nocache_headers();
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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