On Mon, Mar 23, 2009 at 10:12 AM, Darius Rus <dariusrus@xxxxxxxxx> wrote: > Hi, > > I have an issue related to caching on apache server (my setup is > Apache/2.2.11 (Win32) in front of tomcat/6.0.18 using mod_jk/1.2.27) > > I have a dynamic (JSP) page with a form that can be submitted that contains: > > response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 > response.setHeader("Pragma","no-store, no-cache, must-revalidate"); //HTTP 1.0 > response.addHeader("Cache-Control", "post-check=0, pre-check=0"); > response.setDateHeader ("Expires", -1); //prevents caching at the proxy server > > I've added this to avoid caching, so that after the form is submitted > and the user clicks on browser "back" button the form is not displayed > from cache. > [clip] If you're able to determine (or still strongly suspect) that the browser is really behaving as you originally thought, check to see if your browser is actually recognizing the page as expired, but is checking back with a HEAD to see if it's actually been modified. If any part of your server or server-side script is putting in a Last-Modified or Etag headher, then the browser could be validating against these and determining it does not actually need to update. If this is happening, it should show up in your server's access logs as an additional access. Also, check your server's logs to find out what version of the HTTP protocol your browser is requesting with; this will help you track down where your problem is. It's most likely 1.1, but you never know, and 1.0 client's are notoriously unfettered when it comes to caching. Out of curiosity, where did the post-check and pre-check come from? I'm not familiar with those (non-standard) cache-control directives. -Brian -- Feel free to contact me using PGP Encryption: Key Id: 0x3AA70848 Available from: http://pgp.mit.edu/ --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx