当前位置:网站首页>Disable caching with meta HTML tags in all browsers
Disable caching with meta HTML tags in all browsers
2022-07-27 23:25:00 【allway2】
To disable caching in all browsers , Please use the following code :
Meta Mark (HTML)
Add this code to the <head> part , For example, in <title> After marking .
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />.htaccess ( Apache )
<IfModule mod_headers.c>
Header set Cache-Control "no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires 0
</IfModule>PHP
header('Cache-Control: no-cache, no-store, must-revalidate');
header('Pragma: no-cache');
header('Expires: 0');Ruby on Rails
response.headers['Cache-Control'] = 'no-cache, no-store, must-revalidate'
response.headers['Pragma'] = 'no-cache'
response.headers['Expires'] = '0'Python Flask
resp.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"
resp.headers["Pragma"] = "no-cache"
resp.headers["Expires"] = "0"Go
responseWriter.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
responseWriter.Header().Set("Pragma", "no-cache")
responseWriter.Header().Set("Expires", "0")ASP
Response.addHeader "Cache-Control", "no-cache, no-store, must-revalidate"
Response.addHeader "Pragma", "no-cache"
Response.addHeader "Expires", "0"ASP.NET
Response.AppendHeader("Cache-Control", "no-cache, no-store, must-revalidate");
Response.AppendHeader("Pragma", "no-cache");
Response.AppendHeader("Expires", "0");边栏推荐
- Pyqt5 rapid development and practice 4.10 window drawing controls
- 2022/3/22 examination summary
- containerd ctr运行ansible容器执行ansible-playbook任务完整命令
- Cloudcompare & PCL point cloud equally spaced slices
- Interviewer: I can't carry a backpack at all. Are you going by yourself or I'll give you a lift?
- Jsonpath: a powerful rule parsing and parameter lookup tool for JSON
- 干货|语义网、Web3.0、Web3、元宇宙这些概念还傻傻分不清楚?(中)
- Test article
- 面试官:说一下网络数据传输的具体流程
- 8000字讲透OBSA原理与应用实践
猜你喜欢

Microsoft Office 2019 download installation activation tutorial (full process diagram)

Tips and extensions of graph theory

毕设-基于SSM高校后勤管理系统

Simple and practical data visualization cases
C language explanation series -- understanding of functions (5) function recursion and iteration

面试官:说一下网络数据传输的具体流程

Pro multi store version system, versatile is it!

Visual display method of machine learning project

Five network management trends in 2022

LANproxy mapping local development environment
随机推荐
Jsonpath: a powerful rule parsing and parameter lookup tool for JSON
Excel only wants to visualize charts and make data move? Yes, come and watch (with a large number of templates to download)
Arm32 for remote debugging
Safety foundation 2
Basic SQL DQL
Memoirs of three years in junior high school
寻找和利用 XXE – XML 外部实体注入
TFRecord的Shuffle、划分和读取
Process and planned task management
Px4 module design part 13: workqueue design
【GNN报告】加拿大蒙特利尔唐建:Geometric Deep Learning For Drug Discovery
Three consecutive high-frequency interview questions of redis online celebrity: cache penetration? Cache breakdown? Cache avalanche?
WWW 2019 | HAN:异质图注意力网络
Convnext:a convnet for the 2020s - model Brief
2022/3/10 exam summary
Cron expression
8000 word explanation of OBSA principle and application practice
Tips and extensions of graph theory
Basic SQL DDL
Visual display method of machine learning project