Monday, 15 November 2010

Wicket, Open Flash Chart, HTTPS and Internet Explorer

NextReports Server uses Open Flash Chart to present charts inside dashboards.

After setting a https server, on Internet Explorer all the flash widgets showed a #2032 Error. Firefox was working as expected. This was obviously an Internet Explorer bug and the solution to it was to add two response headers : "Pragma" and "Cache-Control".

Testing again, everything was ok, except refresh action. A refresh on IE wouldn't load the chart. The problem was IE cache. Also no drill down was possible because of this. The cache mechanism in Internet Explorer is different from that used by other browsers like Firefox. So we need to force IE to not cache flash. We add another response header "Expires" and set it to -1, and also we used "no-store" value  for "Cache-Control".

Final solution was to use in our WebResource the following :

protected void setHeaders(WebResponse response) {
    response.setHeader("Pragma", "public");
    response.setHeader("Cache-Control", "no-store, must-revalidate");
    response.setHeader("Expires", "-1");          
}    

1 comment:

  1. IEEE Final Year Project centers make amazing deep learning final year projects ideas for final year students Final Year Projects for CSE to training and develop their deep learning experience and talents.

    IEEE Final Year projects Project Centers in India are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation.

    corporate training in chennai corporate training in chennai

    corporate training companies in india corporate training companies in india

    corporate training companies in chennai corporate training companies in chennai

    I have read your blog its very attractive and impressive. I like it your blog. Digital Marketing Company in Chennai

    ReplyDelete