当前位置:网站首页>Wechat built-in browser prohibits caching
Wechat built-in browser prohibits caching
2022-07-29 06:06:00 【Denny Hui】
Solution 1:
Add the following header information in the debugging phase or frequently updated pages :
<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" />
Solution 2:
When updating the file , In reference to css,js Add a version number to the statement of the file , It can effectively prevent the browser from using the cache all the time css,js
<link href="css/demo.css?v=201606131149" rel="stylesheet">
Solution 3:
Methods to prevent pages from being cached , stay URL Add random parameters later , In this way, different connections are accessed each time
window.location='xxx.html?_r='+Math.random();
Ultimate solution :
Page dynamic introduction js file :
// prevent js File cache .
var now = new Date();
var number = now.getYear().toString() + now.getMonth().toString() + now.getDate().toString() + now.getHours().toString() + now.getMinutes().toString() + now.getSeconds().toString();
document.write('<scr' + 'ipt type="text/javascript" src="internal-scripts/js/BUdas-public.js?v='+number+'"></scr' + 'ipt>');
document.write('<scr' + 'ipt type="text/javascript" src="internal-scripts/js/BUdas-request.js?v='+number+'"></scr' + 'ipt>');
document.write('<scr' + 'ipt type="text/javascript" src="internal-scripts/js/BUdas-chart.js?v='+number+'"></scr' + 'ipt>');
document.write('<scr' + 'ipt type="text/javascript" src="internal-scripts/js/BUdas-report.js?v='+number+'"></scr' + 'ipt>');
Please scan and follow official account for more articles :
边栏推荐
- 性能优化之趣谈线程池:线程开的越多就越好吗?
- 【目标检测】6、SSD
- [go] use of defer
- 第三周周报 ResNet+ResNext
- clion+opencv+aruco+cmake配置
- [image classification] how to use mmclassification to train your classification model
- [target detection] KL loss: bounding box progression with uncertainty for accurate object detection
- 迁移学习——Transitive Transfer Learning
- 虚假新闻检测论文阅读(四):A novel self-learning semi-supervised deep learning network to detect fake news on...
- 研究生新生培训第三周:ResNet+ResNeXt
猜你喜欢

神经网络相关知识回顾(PyTorch篇)

anaconda中移除旧环境、增加新环境、查看环境、安装库、清理缓存等操作命令

研究生新生培训第一周:深度学习和pytorch基础

Yum local source production

【DL】关于tensor(张量)的介绍和理解

Spring, summer, autumn and winter with Miss Zhang (3)

迁移学习——Low-Rank Transfer Subspace Learning

clion+opencv+aruco+cmake配置

Centos7 silently installs Oracle

mysql插入百万数据(使用函数和存储过程)
随机推荐
Semaphore (semaphore) for learning notes of concurrent programming
第一周任务 深度学习和pytorch基础
Operation commands in anaconda, such as removing old environment, adding new environment, viewing environment, installing library, cleaning cache, etc
[tensorrt] convert pytorch into deployable tensorrt
Nifi changed UTC time to CST time
研究生新生培训第一周:深度学习和pytorch基础
虚假新闻检测论文阅读(三):Semi-supervised Content-based Detection of Misinformation via Tensor Embeddings
电脑视频暂停再继续,声音突然变大
简单聊聊 PendingIntent 与 Intent 的区别
迁移学习—Geodesic Flow Kernel for Unsupervised Domain Adaptation
【bug】XLRDError: Excel xlsx file; not supported
[pycharm] pycharm remote connection server
Research on the implementation principle of reentrantlock in concurrent programming learning notes
IDEA中设置自动build-改动代码,不用重启工程,刷新页面即可
一、迁移学习与fine-tuning有什么区别?
微信小程序源码获取(附工具的下载)
These process knowledge you must know
Android studio login registration - source code (connect to MySQL database)
[convolution kernel design] scaling up your kernels to 31x31: revising large kernel design in CNN
【pycharm】pycharm远程连接服务器