title: jQuery Script caching on localhost
body: <p>I have an ASP.NET 3.5 web application written in VS 2010. I have an aspx with a script reference to a .js file that resides in a Scripts folder.</p>
  
  <pre><code>&lt;script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="Scripts/HeaderControl.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Within the .js file I'm using jQuery to do some various operations, one of which was simply a debugging statement that used alert to spit out a value on the page so I could see what it was.</p>
  
  <pre><code>if ($) {
      $(document).ready(function () {
          $("input[id='q']").click(function($e) {
              alert("clicked");
          });
      });
  }
  </code></pre>
  
  <p>This all worked great until I went to remove the debug statement (the alert "clicked"). Upon completely removing it from the .js, I rebuilt the project, hit F5 to run it on my localmachine, but as soon as I clicked upon the input tag above <strong>the alert still popped up and said "clicked".</strong> I tried one thing after another trying to get the web app to realize that the .js had been changed, but it kept displaying the alert every time that I'd click on the input tag. I finally decided to rename the .js to something completely different, at which time the web app realized that the .js had been changed and it quit displaying the alert when I'd click upon the input tag.</p>
  
  <p>So why was this .js file being cached? It's a very annoying behavior and I'd love to know what exactly was causing it. Any help would be appreciated. Thanks!</p>
  
  <p><strong>EDIT:</strong>
  Browser was IE7. I didn't check to see if it did it in Mozilla as well. Regardless, I've done at least a 100 different .js files and I've never noticed this behavior before. The only difference for me is that this .js is in a web app, whereas usually I'm creating them in ASP.NET web site projects.</p>