title: Clear IE cache when using AJAX without a cache busting querystring, but using http response header
body: <p>I'm having the classic IE-caches-everything-in-Ajax issue. I have a bit of data that refreshes every minute.</p>
  
  <p>Having researched the forums the solutions boil down to these options (http://stackoverflow.com/questions/5997857/grails-best-way-to-send-cache-headers-with-every-ajax-call):</p>
  
  <ul>
  <li>add a cache-busting token to the query string (like ?time=[timestamp])</li>
  <li>send a HTTP response header that specifically forbids IE to cache the request</li>
  <li>use an ajax POST instead of a GET</li>
  </ul>
  
  <p>Unfortunately the obvious querysting or "cache: false" setting will not work for me as the updated data file is hosted on Akamai Netstorage and cannot accept querystrings. I don't want to use POST either.</p>
  
  <p><strong>What I want to do is try send an HTTP response header that specifically forbids IE to cache the request</strong> or if anyone else knows another cache busting solution??</p>
  
  <p>Does anyone know how this might be done? Any help would be much appreciated.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>(function ($) {
  var timer = 0;
  var Browser = {
      Version: function () {
          var version = 999;
          if (navigator.appVersion.indexOf("MSIE") != -1) version = parseFloat(navigator.appVersion.split("MSIE")[1]);
          return version;
      }
  }
  $.fn.serviceboard = function (options) {
      var settings = { "refresh": 60};
  
      return this.each(function () {
          if (options) $.extend(settings, options);
          var obj = $(this);
          GetLatesData(obj, settings.refresh);
          if (settings.refresh &gt; 9 &amp;&amp; Browser.Version() &gt; 6) {
              timer = setInterval(function () { GetLatestData(obj, settings.refresh) }, settings.refresh * 1000);
          }
      });
  };
  function GetLatestData(obj, refresh) {
      var _url = "/path/updated-data.htm";
      $.ajax({
          url: _url,
          dataType: "html",
          complete: function () {},
          success: function (data) {  
              obj.empty().append(data);               
              }
          }
      });
  }
  })(jQuery);
  </code></pre>