title: stop browser from caching a text file
body: <p>For the twelve days of Christmas I'm running this simple family website. As part of it, everyday I edit a text file that will give different answers/content each day. Well I'm having a problem where I have to tell everyone to delete there cache to get the new info. I've never had this before. I just barely added these two statements.</p>
  
  <pre><code>&lt;meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /&gt;
  &lt;meta http-equiv="Pragma" content="no-cache" /&gt;
  &lt;meta http-equiv="Expires" content="0" /&gt;
  </code></pre>
  
  <p>and </p>
  
  <pre><code>response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1.
  response.setHeader("Pragma", "no-cache"); // HTTP 1.0.
  response.setDateHeader("Expires", 0);
  </code></pre>
  
  <p>found <a href="https://stackoverflow.com/questions/49547/making-sure-a-web-page-is-not-cached-across-all-browsers">How to control web page caching, across all browsers?</a></p>
  
  <p>I tested that everything still loads fine but I do not want to test it by changing the actual content until tomorrow. My question is, is there any way to make sure that the browser does not cache the text files that I am pulling in using using this javascript code</p>
  
  <pre><code>function readInFile(file)
  {
      var rawFile = new XMLHttpRequest();
  
      rawFile.open("GET", file, true);
      rawFile.onreadystatechange = function()
      {
          if (rawFile.readyState === 4)
          {
              if (rawFile.status === 200 || rawFile.status == 0)
              {
                  parseFile(rawFile.responseText, document.getElementById("answerText").value)
              }
          } 
      };
      rawFile.send(null);
  }
  </code></pre>
  
  <p>I don't want the browsers to stop caching the html/js but continue caching the text files. Will what I have now prevent the browsers from doing such? I've never had a problem like this before> I also used the HTML5 Boilerplate this time around just to try it out if that makes any difference. I ended up removing alot of it though.</p>