Results 1 to 1 of 1
- 06-13-2012, 12:27 PM #1Member
- Join Date
- Jan 2011
- Rep Power
avoiding browser chache when velocity templates are used?
We have separate velocity templates for each page.Then to render a page, we will get the merged vm template as a string and then flush to a jsp.
The issue is we need to eliminate browser chaching for few pages.We have added the following codes both in the flushed jsp and vm template.But
the content is still browser cached and this isue is happening for windows XP and not with other OS.We need to eradicate this issue as XP is mostly used.
$response.setHeader("Expires", "Mon, 23 Aug 1982 12:00:00 GMT")
$response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate")
$response.addHeader("Cache-Control", "post-check=0, pre-check=0")
inside Head tag of all velocity templates. And response obj is added to context map. Added the same snippet in jsp.
Also added the <Meta> tag in all velocity templates as
<META HTTP-EQUIV="Cache-control" CONTENT="no-cache">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
Still the issue persists.Suggestions/solutions needed in this regard.
- By charanyevadu in forum New To JavaReplies: 1Last Post: 03-27-2012, 08:56 AM
- By llee in forum New To JavaReplies: 4Last Post: 02-11-2012, 12:10 AM
- By protocos in forum EclipseReplies: 1Last Post: 03-06-2009, 03:31 AM
- By Eric in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 07-04-2007, 07:42 AM