Rutt Report post Posted July 27, 2009 Hi guys, I seem to be caught between a rock in a hard place here and I'm quite frustrated. I have a chart (map) where you can drill down into the country. Upon first load it shows the data just fine. Upon changing a parameter, it changes the data for the top of the map, but when you drill down, it has the data from the previous parameter. It seems to cache the XML or the .SWF. This only occurs in Internet Explorer. So the fix for this is to disable caching on the page: HttpContext.Current.Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1)); HttpContext.Current.Response.Cache.SetValidUntilExpires(false); HttpContext.Current.Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches); HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache); HttpContext.Current.Response.Cache.SetNoStore(); This works great! That is until I enabled SSL on the entire website. When I did that, I get "error in loading data." upon drill down. So I searched these great forums and found the solution as follows: Cache-Control: cache, must-revalidate Pragma: public Well doing this fixes the "error in loading data" problem but then the IE caching issue comes back. Any ideas on what will fix BOTH of these issues? I've tried entering nocache=GetCurrentTime statements to no avail. I get random millisecond values, but it doesn't seem to help. Thanks in advance. I'm a paying customer. I have a ticket in (#5523) but response is slow - I assume because of the geography. Share this post Link to post Share on other sites
saptarshi Report post Posted July 28, 2009 Hello, We have already replied to your Ticket. Could you please pass noCache attribute to the URLs that are generating XMLs and try once? Example: mapchartdata.aspx?noCache={random number} Hope this helps. Share this post Link to post Share on other sites
Rutt Report post Posted July 28, 2009 (edited) The issue has been resolved thanks to FusionCharts support! I ended up having to "double escape" the URLs. So the magic combination for me was... 1. System.Web.HttpResponse response; response = System.Web.HttpContext.Current.Response; response.AppendHeader("Pragma", "public"); response.AppendHeader("Cache-control", "cache, must-revalidate"); on the XML provider page. 2. Setting nocache=DateTime.Now.Ticks.ToString() on all .swf and xml providing URLs 3. Escaping twice in the URL: linkURL = Server.UrlEncode("javascript:updateMap("" + this.getMapFile(dr["CountryID"].ToString()) + "","" + Server.UrlEncode("mapchartdata.aspx?country=" + dr["countryID"].ToString() + "&noCache=" + DateTime.Now.Ticks.ToString()) + "");"); 4. Escaping in the javascript that renders the map on drill-down Map_mapChart.setDataURL(escape(dataURL + "?currTime=" + getTimeForURL())); function getTimeForURL() { var dt = new Date(); var strOutput = ""; strOutput = dt.getHours() + "_" + dt.getMinutes() + "_" + dt.getSeconds() + "_" + dt.getMilliseconds(); return strOutput; } Edited July 29, 2009 by Guest Share this post Link to post Share on other sites
Guest Rajroop Report post Posted July 30, 2009 You are most welcome. Here to serve! :hehe: Share this post Link to post Share on other sites