<c:import> getting old (probably cached) html content
I am hitting a URL in a JSP thru the tag:
<'c:import url="${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}/${pageContext.request.contextPath}/html/temp.html" var="content" />I am getting the html 开发者_如何学Ccontent properly. Now, I change the html content for temp.html but the JSP is rendering the old html content. Instead, if I make a direct call to the http://servername.com/html/temp.html, I get the newly modified content.
The htmls are hosted on Akamai servers and I've made sure that the Akamai cache is getting refreshed.
Any clue why does this happen? Is there any other kind of proxy/server cache which is retrieving the old content?
Thanks, Narain
Try adding a query string with some random value. E.g. a timestamp.
<jsp:useBean id="now" class="java.util.Date" />
<c:import url="/${pageContext.request.contextPath}/html/temp.html?${now.time}" var="content" />
Note that I stripped unnecessary noise from your url
.
could be your browser (try ctrl + f5) to do a forced refresh on your page with the import in.
精彩评论