Html / PHP页面被缓存(客户端),当它不应该 [英] Html / php page being cached (client side) when it should not be

查看:79
本文介绍了Html / PHP页面被缓存(客户端),当它不应该的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

URL在这里: http://www.thexsoft.com/DownloadFolder /download.php?file=P2PTransfer

这个页面基本上是一种让我有设置url来下载我发布的某个问题的方法。

This page is basically a way for me to have set url to download a certain problem i published. This page should never ever be cached, but it seems to be caching still.

我已经设置了以下项目:

这个页面永远不会被缓存,但它似乎仍然是缓存。

I have set the following items:

<meta http-equiv="expires" content="0" >
<meta http-equiv="cache-control" content="no-cache" >
<meta http-equiv="pragma" content="no-cache" >
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" > 

当我没有fastclick.net广告代码时,网页上的html代码会验证100%中,但我现在保留,因为它通常在。

The html code on the page validates 100% when i don't have the fastclick.net ad code in, but i keept it in now because it normally is in.

推荐答案

我使用 Firebug

I checked your headers using Firebug:

Cache-Control: max-age=1209600
Expires: Tue, 28 Apr 2009 18:49:15 GMT



<在PHP中,您可以使用标头()发送HTTP标头。

In PHP you can send HTTP headers with header().

header('Pragma: no-cache');
header('Expires: -1');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');

这篇关于Html / PHP页面被缓存(客户端),当它不应该的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆