Home
Analytics
meta tag to set cache-control attribute
Meher
My html generated report is getting cached,so i am not able to view the changes.How can we set meta tag to set cache-control attribute to 'no-cache'.
thanks in advance
Find more posts tagged with
Comments
Virgil Dodson
Hi Meher,
If you are writing your HTML BIRT report to the outputStream of a Servlet response, then you could try something like below.
response.setContentType("text/html");
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
Otherwise, if you are constucting your own HTML, make sure to include lines like below in the HTML/HEAD
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">