Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
确保Mozilla Firefox浏览器不缓存网页的JSP代码?_Jsp_Firefox_Caching_Browser_Mozilla - Fatal编程技术网

确保Mozilla Firefox浏览器不缓存网页的JSP代码?

确保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浏览器仍然显示页面的缓存版

我试图通过添加以下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浏览器仍然显示页面的缓存版本


请建议最好的方法

在不太了解代码的情况下,确保页面不被缓存的一种方法是向没有功能的URL添加随机标记。i、 e.如果生成的URL访问您的此页面的路径,则URL是否包含随机标记,例如?标记=[blah]。这将使浏览器每次都认为它是一个新页面,并且不会显示缓存版本