确保Mozilla Firefox浏览器不缓存网页的JSP代码?
我试图通过添加以下jsp代码来添加缓存清除标题,以确保Mozilla Firefox浏览器不会缓存网页确保Mozilla Firefox浏览器不缓存网页的JSP代码?,jsp,firefox,caching,browser,mozilla,Jsp,Firefox,Caching,Browser,Mozilla,我试图通过添加以下jsp代码来添加缓存清除标题,以确保Mozilla Firefox浏览器不会缓存网页 response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); response.setDateHeader ("Expires", 0); response.setHeader("Pragma","no-cache"); //HTTP 1.0 Mozilla浏览器仍然显示页面的缓存版
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
response.setDateHeader ("Expires", 0);
response.setHeader("Pragma","no-cache"); //HTTP 1.0
Mozilla浏览器仍然显示页面的缓存版本
请建议最好的方法 在不太了解代码的情况下,确保页面不被缓存的一种方法是向没有功能的URL添加随机标记。i、 e.如果生成的URL访问您的此页面的路径,则URL是否包含随机标记,例如?标记=[blah]。这将使浏览器每次都认为它是一个新页面,并且不会显示缓存版本