title: Apache caching javascript assets?
body: <p>Not so long ago I was having trouble with javascript assets. When I made changes to them they wouldn't take effect and the file would become invalid javascript (firebug throwing errors and warnings).</p>
  <p>I noticed that my changes weren't appearing and special characters were being added to the end of the file. A bit more digging and I noticed that the special characters were exactly the number of characters of my edits.</p>
  <p>Original code:</p>
  <pre><code>$(document).ready(function(){
       alert('what');
  });
  </code></pre>
  <p>Adding a line, should looks like this:</p>
  <pre><code>$(document).ready(function(){
       alert('what');
       alert(&quot;what's going on?!);
  });
  </code></pre>
  <p>Renders like this:</p>
  <pre><code>$(document).ready(function(){
       alert('what');
  });��������������������������
  </code></pre>
  <p>When I researched I found that modifying apache config's <code>/etc/httpd/conf/httpd.conf</code> and commenting out <code>EnableSendfile off</code> fixed the issue.</p>
  <h2>However...</h2>
  <p>Now the issue has returned, but apache config hasn't changed.</p>
  <p>Please help. My current work around is renaming the file, viewing the new file and naming it back; this annoys me tremendously.</p>
  <p>I'm developing on a vagrant box, CentOS 6, PHP 5.3/apache 2 - the original solution can be found here: <a href="https://stackoverflow.com/questions/6298933/shared-folder-in-virtualbox-for-apache">Shared folder in VirtualBox for Apache</a>.</p>
  <p>Unfortunately this no longer seems to work.</p>