页面资源缓存 html css js

Posted justSmile2

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了页面资源缓存 html css js相关的知识,希望对你有一定的参考价值。

html

<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Cache" content="no-cache">

css、js

<link rel="stylesheet" href="../css/register.css"/>
<script src="../scripts/register.js"></script>
改成
<link rel="stylesheet" href="../css/register.css?v=20161020"/>
<script src="../scripts/register.js?v=20161020"></script>
(  当然,用 webpack 打包工具比较好,前提是你的项目代码足够规范   )

 

参考链接

以上是关于页面资源缓存 html css js的主要内容,如果未能解决你的问题,请参考以下文章