[
https://issues.apache.org/jira/browse/WICKET-3921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13071699#comment-13071699
]
Timo Weber commented on WICKET-3921:
------------------------------------
Hi Martin,
yes, thanks. This looks good to me and will solve the problem for sure. I've
appended a very simple repo case below. It's a bit tricky to catch the redirect
response in Firebug, if I can be of any further help, please let me know.
public class AjaxResponseHeadersPage extends WebPage {
public AjaxResponseHeadersPage() {
setOutputMarkupId(true);
add(new AjaxFallbackLink("link1") {
@Override
public void onClick(AjaxRequestTarget target) {
// adding the page to the target will produce a wicket ajax
redirect
// without any cache headers
target.addComponent(getPage());
}
});
add(new AjaxFallbackLink("link2") {
@Override
public void onClick(AjaxRequestTarget target) {
// this produces an ajax response with cache headers set
properly
target.addComponent(this);
}
}.setOutputMarkupId(true));
}
}
and
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
<body>
<a wicket:id="link1" href="#">Ajax response (Redirect) without any cache
headers.</a>
<a wicket:id="link2" href="#">Ajax response with proper cache headers.</a>
</body>
</html>
> No HTTP response cache headers are set in Wicket Ajax redirects
> ---------------------------------------------------------------
>
> Key: WICKET-3921
> URL: https://issues.apache.org/jira/browse/WICKET-3921
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: Timo Weber
> Priority: Minor
>
> Usually HTTP response cache headers are being set in AjaxRequestTarget for
> Ajax responses. But for redirects, the handling is done in WebResponse where
> no cache headers are being set, which could lead to some trouble.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira