开发者社区> 问答> 正文

js清除页面缓存的html,css,js

请教个问题,怎么用js清除浏览器缓存,比如每次进入页面后先清理上次浏览器缓存的html,css,js,最好是用js的方法清除的。

展开
收起
a123456678 2016-07-18 10:41:02 3771 0
3 条回答
写回答
取消 提交回答
  • 善用 meta 标签:

    <meta http-equiv="cache-control" content="max-age=0" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="expires" content="0" />
    <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
    <meta http-equiv="pragma" content="no-cache" />
    2019-07-17 19:57:35
    赞同 展开评论 打赏
  • localstorage 请自行查阅这个方法使用

    2019-07-17 19:57:35
    赞同 展开评论 打赏
  • <meta http-equiv="pragma" content="no-cache"/>
    2019-07-17 19:57:35
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
用户态高速块缓存方案 立即下载
编程语言如何演化—— 以 JS 的 private 为例 立即下载
高性能Web架构之缓存体系 立即下载

相关实验场景

更多