[opencms-dev] Cache-Control - HTTP Response - Cache-Control keep appearing as public and NOT no-cache
Pan Zhi wei
zhiwei at d3signs.com
Mon Aug 20 16:20:30 CEST 2018
Hi Everyone,
May i check, why does the http response header will always appear
as Cache-Control: public
even though i already put the following code in the JSP
<%@page import="org.opencms.flex.*" %>
<%@page import="org.opencms.util.*" %>
<%
HttpServletResponse topLevelResponse =
CmsFlexController.getController(request).getTopResponse();
topLevelResponse.setHeader("Cache-Control", "no-cache" );
topLevelResponse.setHeader("expires", "0" );
topLevelResponse.setHeader("expires", "Tue, 01 Jan 1980 1:00:00 GMT" );
topLevelResponse.setHeader("expires", "0" );
topLevelResponse.setHeader("pragma", "no-cache" );
topLevelResponse.setHeader("Pragma", "no-cache"); // although a request
header only, it is interpreted by some older proxies
topLevelResponse.setHeader("Cache-Control", "no-cache");
topLevelResponse.addHeader("Cache-Control", "max-age=0");
topLevelResponse.addHeader("Cache-Control", "must-revalidate");
topLevelResponse.addHeader("Cache-Control", "private");
%>abc1a
--
*Pan Zhiwei *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20180820/21fff605/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 11.jpg
Type: image/jpeg
Size: 131606 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20180820/21fff605/attachment.jpg>
More information about the opencms-dev
mailing list