IEキャッシュを無効にする


3つの方法があります.
一、HTMLページにMETAタグを入れる:
      
      
      
      
      
   
二、jspページにjavaコードを加える:
  <%    
  response.setHeader("Pragma","No-cache");    
  response.setHeader("Cache-Control","no-cache");    
  response.setDateHeader("Expires",   0);    
  %>
 
三、Filterの使用:
 

import java.io.IOException;       
import javax.servlet.Filter;    
import javax.servlet.FilterChain;    
import javax.servlet.FilterConfig;    
import javax.servlet.ServletException;    
import javax.servlet.ServletRequest;    
import javax.servlet.ServletResponse;    
import javax.servlet.http.HttpServletResponse;    
   
   
public class Cacheflush implements Filter{    
    private FilterConfig config ;    
    public void destroy() {            
    }    
   
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {     
        ((HttpServletResponse)response).setHeader("Pragma","No-cache");     
        ((HttpServletResponse)response).setHeader("Cache-Control","no-cache");     
        ((HttpServletResponse)response).setHeader("Expires","0");     
        chain.doFilter(request, response);    
    }    
   
    public void init(FilterConfig config) throws ServletException {      
        this.config = config;    
    }    
   
}