Pragma: no-cache
Caching—both in Web browsers and proxy servers—can be affected using PHP’s header() function. Four header types are involved:
• Last-Modified
• Expires
• Pragma
• Cache-Control
The first three header types are part of the HTTP 1.0 standard. The Last-Modified header uses a UTC(Coordinated Universal Time) date-time value. If a caching system sees that the Last-Modified valueis more recent than the date on the cached version of the page, it knows to use the new version from the server. Expires is used as an indicator as to when a cached version of the page should no longer be used (inGreenwich Mean Time).
Setting an Expires value in the past should always force the page from theserver to be used:
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
Pragma is just a declaration for how the page data should be handled. To avoid caching of a page, use
header("Pragma: no-cache")
The Cache-Control header was added in HTTP 1.1 and is a more finely tuned option.
Directive Meaning
public Can be cached anywhere
private Only cached by browsers
no-cache Cannot be cached anywhere
must-revalidate Caches must check for newer versions
proxy-revalidate Proxy caches must check for newer versions
max-age A duration, in seconds, that the content is cacheable
s-maxage Overrides the max-age value for shared caches
Keep all systems from caching a page
header("Last-Modified: Mon, 26 Jul 2016 05:00:00 GMT"); //Right now!
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); //Way back then!
header("Pragma: no-cache");
header("Cache-Control: no-cache");
Pragma: no-cache的更多相关文章
- META元素使用的简单学习
meta标签是我们学习html时容易忽略的标签,其实它的作用很大,下面就一些网上关于meta标签的讲解内容做一个简单的归纳. META标签共有两个属性,它们分别是Http-equiv属性和Name属性 ...
- snoopy 强大的PHP采集类使用实例代码
下载地址: http://www.jb51.net/codes/33397.html Snoopy的一些特点: 1抓取网页的内容 fetch 2 抓取网页的文本内容 (去除HTML标签) fetcht ...
- PHP抓取采集类snoopy介绍
PHP抓取采集类snoopy介绍 一个PHP的抓取方案 在 2011年07月04日 那天写的 已经有 10270 次阅读了 感谢 参考或原文 服务器君一共花费了14.288 ms进行了2次 ...
- snoopy(强大的PHP采集类) 详细介绍
Snoopy是一个php类,用来模拟浏览器的功能,可以获取网页内容,发送表单,可以用来开发一些采集程序和小偷程序,本文章详细介绍snoopy的使用教程. Snoopy的一些特点: 抓取网页的内容 fe ...
- iOS 断点上传文件
项目开发中,有时候我们需要将本地的文件上传到服务器,简单的几张图片还好,但是针对iPhone里面的视频文件进行上传,为了用户体验,我们有必要实现断点上传.其实也不是真的断点,这里我们只是模仿断点机制. ...
- 记录一个nginx的配置
rt #user xiaoju; worker_processes ; #error_log logs/error.log notice; #error_log logs/error.log debu ...
- SDWebImage源码解析
但凡经过几年移动开发经验的人去大公司面试,都会有公司问到,使用过哪些第三方,看过他们的源码嘛?而SDWebImage就是经常被面试官和应聘者的提到的.下面将讲述SDWebImage的源码解析以及实现原 ...
- SDWebImage之SDImageCache
SDImageCache和SDWebImageDownloader是SDWebImage库的最重要的两个部件,它们一起为SDWebImageManager提供服务,来完成图片的加载.SDImageCa ...
- python scrapy 登录知乎过程
前面了解了scrapy框架的大概各个组件的作用, 现在要爬取知乎数据,那么第一步就是要登录! 看下知乎的登录页面发现登录主要是两大接口 一: 登录页面地址,获取登录需要的验证码,如下图 打开知乎登录页 ...
- iOS通过切片仿断点机制上传文件
项目开发中,有时候我们需要将本地的文件上传到服务器,简单的几张图片还好,但是针对iPhone里面的视频文件进行上传,为了用户体验,我们有必要实现断点上传.其实也不是真的断点,这里我们只是模仿断点机制. ...
随机推荐
- [AX]AX2012 R2 出差申请和支出报告
AX2012中有个模块叫做出差和支出,用于管理出差以及相关的费用,用户只能在员工自助服务EP站点上提交出差申请.费用报销报告,在Client程序中做审核以及后续的支付动作等,最后形成相关的财务分录. ...
- css后台页面布局技巧
目标: 实现左边侧边栏固定,右边内容区自适应 侧边栏内容较少时背景100%高度展示 侧边栏内容较多时可以滚动,且不让显示滚动条(显示太丑) 内容区较少时不出现滚动条,较多时可以滚动 code: < ...
- argc和argv
ARGc和ARGv中的ARG指的是"参数"(外语:ARGuments, argument counter 和 argument vector ) argc: 整数,用来统计你运行程 ...
- SQL筛选出同一学科的时间最新的记录
1.建表语句 CREATE TABLE `score` ( `id` ) NOT NULL AUTO_INCREMENT, `student_id` ) ' COMMENT '学生表ID', `nam ...
- linux 下查看cpu信息
linux 操作系统的位数查看 A. getconf LONG_BIT 如果是32表示是32位 B. file /sbin/init信息全面一些 root@kali:~/software# file ...
- 第一篇:Hadoop简介
前言 本文大致介绍下Hadoop的一些背景知识,为后面深入学习打下铺垫. 什么是Hadoop Hadoop是一个开源分布式计算平台,它以HDFS文件系统和MapReduce计算框架为核心. 前者能够让 ...
- setTag,getTage复用
radioButtons = new RadioButton[rgMain.getChildCount()]; //遍历RadioGroupfor (int i = 0; i < radioBu ...
- wireshark----linux
1.[root@lc~]# tshark Running as user "root" and group "root". This could be da ...
- CoreData 多表 关联
本文转载至 http://www.jianshu.com/p/e9f3b5e0cd19 1.概念简介 coreData中存在复杂的数据关系时,一张表难以满足需求,此时就需要了解使用coreData多表 ...
- Spring Mvc 页面传递数组到后台接收
1.定义一个简单的类 User.java public class User { private Integer id; private String name; public Integer get ...