---
title: "jsp 页面不缓存（网上到处都是，备忘）"
author: "yangdc"
date: "2007-12-03T11:01:16Z"
tags: []
slug: "jsp"
draft: false
lastmod: "2007-12-03T11:01:16Z"
id: 145540
url: "https://yangdc.iteye.com/blog/145540"
---

1, 
<% 
response.setHeader("Pragma","No-cache"); 
response.setHeader("Cache-Control","no-cache"); 
response.setDateHeader("Expires", 0); 
%> 
2,  
<HEAD> 
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> 
<META HTTP-EQUIV="Expires" CONTENT="0"> 
</HEAD>  

<span style="color:red">
今天遇到的问题：
  加入防止缓存代码后，页面并没有重新读入js，无意中加了一个alert调试后，就重新读入了。</span>