활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
Hi all,
I am using this line of code: <% response.setHeader("Dispatcher", "no-cache"); %> to prevent caching of some pages on my CQ site. This works very well in Chrome but actually causes a 500 Internal Server Error when using IE. Interestingly, even when setting the standard HTTP no-cache headers (below) we see the same behaviour:
<%
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1.
response.setHeader("Pragma", "no-cache"); // HTTP 1.0.
response.setDateHeader("Expires", 0); // Proxies.
%>
Furthermore, even when setting these headers as meta tags, we see the same server response when hitting the page from IE. Please note that we do not see the problem when accessing the site on the Author instance, only the Publisher. Any thoughts as to what I'm doing wrong will be very much appreciated.
해결되었습니다! 솔루션으로 이동.
조회 수
답글
좋아요 수
Have you white listed cookie in optout[1] service?
[1] http://localhost:4502/system/console/configMgr/com.adobe.granite.optout.impl.OptOutServiceImpl
조회 수
답글
좋아요 수
The server generates a 500 error? Like you see it in the AEM access.log file?
조회 수
답글
좋아요 수
Yeah, weird right?
Here's a screen shot of the server's reaction...[img]Screen Shot 2014-09-12 at 19.07.56.png[/img]
조회 수
답글
좋아요 수
That's from Apache (I think). Does this also happen if you hit AEM directly (from IE)?
조회 수
답글
좋아요 수
Just to add some more context, I have now discovered that the above conflicts with some cookie-based code immediately after it:
<%
response.setHeader("Dispatcher", "no-cache");
%>
<%
// Check for the existence and value of the log-in cookie
Cookie[] cookies = request.getCookies();
// Boolean to use throughout the comp
Boolean REDACTED1 = false;
// Loop over the available cookies and search for the required one
for(Cookie cookie : cookies){
// Check the match
if(null != cookie && cookie.getName().equals("REDACTED") && cookie.getValue().equals("REDACTED")){
REDACTED1 = true;
}
}
%>
If I remove the code inside the for loop, it works. Interestingly, ANY code added inside the for loop causes the breakage.
조회 수
답글
좋아요 수
Have you white listed cookie in optout[1] service?
[1] http://localhost:4502/system/console/configMgr/com.adobe.granite.optout.impl.OptOutServiceImpl
조회 수
답글
좋아요 수
Yes, Sham, thanks. It is whitelisted. The problem is specific to IE (all versions) not Chrome or Safari.
조회 수
답글
좋아요 수
courtthreeGDC wrote...
Yes, Sham, thanks. It is whitelisted. The problem is specific to IE (all versions) not Chrome or Safari.
Which version of IE? Does it happen with geometrixx site also?
조회 수
답글
좋아요 수