如何防止IE缓存jsp文件 [回复1 | 查看:34]

如何防止IE缓存jsp文件

1, 使用java提供的方法,在jsp或者servlet中都可以


                <%


                response.setheader(&quot;pragma&quot;,&quot;no-cache&quot;);


                response.setheader(&quot;cache-control&quot;,&quot;no-cache&quot;);


                response.setdateheader(&quot;expires&quot;, 0);


                %>


                2, 使用html标记,如下面:


                <head>


                <meta http-equiv=&quot;pragma&quot; content=&quot;no-cache&quot;>


                <meta http-equiv=&quot;cache-control&quot; content=&quot;no-cache&quot;>


                <meta http-equiv=&quot;expires&quot; content=&quot;0&quot;>


                </head>


           
              
            
            
         
              

以艰苦奋斗为荣,以骄奢淫逸为耻

TOP