nocache_headers()(禁止浏览器缓存)
nocache_headers() 用来发送一个 header 头信息,告诉浏览器禁止缓存当前页面,一般在 Ajax 请求时使用,防止出现错误。
用法
nocache_headers();
属性
此函数没有属性。
返回值
此函数无返回值。
例子
function Bing_add_ajax(){ nocache_headers(); echo true; die; } add_action( 'template_redirect', 'Bing_add_ajax' );
其它
此函数位于:wp-includes/functions.php
标签:WordPress
相关阅读 >>
深入解析wordpress中加载模板的get_template_part函数
wordpress 静态化设置 windows主机伪静态去除index.php方法
bluehost服务器主机购买及安装wordpress的教程
更多相关阅读请进入《wordpress》频道 >>