php下session_cache_limiter(private,must-revalidate)–表单填写内容不丢失
来源:互联网 发布:哪个网出售淘宝小号 编辑:程序博客网 时间:2024/04/30 14:08
session_cache_limiter(private,must-revalidate)介绍
指定会话页面所使用的缓冲控制方法:
当session_cache_limiter(‘private’)时,用处是让表单history.go(-1)的时候,填写内容不丢失!就避免页面失效的警告!
这个会话与header(‘cache-control:private,must_revalidate’);效果相同
但是要值得注意的是session_cache_limiter()方法要写在session_start()方法之前才有用;
支持页面回跳详解,session_cache_limiter()的使用详解
现在表单的填写,我们可以用AJAX对用户随时进行验证,进行友好的提示,但是在用户没有留意AJAX友好提示,提交了错误的表单,跳回原页,而填写的信息却全部丢失了。要支持页面回跳,有以下的办法:
1.使用session_cache_limiter方法:
session_cache_limiter('private,must-revalidate');
但是要值得注意的是session_cache_limiter()方法要写在session_start()方法之前才有用;
2.用header来设置控制缓存的方法:
header('Cache-control: private, must-revalidate');//支持页面回跳
0 0
- php下session_cache_limiter(private,must-revalidate)–表单填写内容不丢失
- session_cache_limiter(private,must-revalidate)(回上一页表单值不丢失方法)
- session_cache_limiter(private,must-revalidate)是什么意思
- session_cache_limiter(private,must-revalidate)表单页面回跳
- php中header函数的参数Cache-control:private,no-cache,must-revalidate,max-age的使用方法!
- php中header函数参数的Cache-control:private,no-cache,must-revalidate,max-age是使用方法!
- php中header函数参数的Cache-control:private,no-cache,must-revalidate,max-age的使用方法
- php中header函数参数的Cache-control:private,no-cache,must-revalidate,max-age是使用方法!
- php中header函数参数的Cache-control:private,no-cache,must-revalidate,max-age是使用方法!
- php中header函数参数的Cache-control:private,no-cache,must-revalidate,max-age是使用方法!
- php中header函数参数的Cache-control:private,no-cache,must-revalidate,max-age是使用方法!
- php中header函数参数的Cache-control:private,no-cache,must-revalidate,max-age是使用方法!
- 关于session_cache_limiter('private');
- “Cache-control”常见的取值有private、no-cache、max-age、must-revalidate
- “Cache-control”常见的取值有private、no-cache、max-age、must-revalidate等
- "Cache-control”常见的取值private、no-cache、max-age、must-revalidate及其用意
- “Cache-control”常见的取值有private、no-cache、max-age、must-revalidate等
- 网页缓存控制 Cache-control 常见的取值有private、no-cache、max-age、must-revalidate 介绍
- Hibernate面试题及答案
- vim 多个标签之间切换
- clojure实战——基于logstash搭建日志数据获取与整理平台(2)
- UNIX Tutorial Two
- HDFS副本放置策略的研究和优化
- php下session_cache_limiter(private,must-revalidate)–表单填写内容不丢失
- Android Studio
- Unity中HideInInspector和SerializeField
- SparkSQL 概述
- 持续集成
- 视频会议为中小企业带来更多商机
- 四大适配器控制ListView显示
- 安卓自定义view之打造滚动的通知栏
- Java泛型Type体系