-1

I'm seeing some strange cacheing behavior with (I suspect) Apache. Whenever I change this JavaScript file, what I get in the browser is simply an old version of the file truncated or expanded to match the size of the update file.

For example, if I have the following JavaScript:

console.log(10);
console.log(20);
console.log(30);

And I change the first line to:

console.log(1);

What I get back from the HTTP request is:

console.log(10);
console.log(20);
console.log(30)

The only way I can get the web server to return the actual file contents is to rename the file. This also doesn't seem to be happening for any other static files, like my CSS.

This is on a CentOS 6.5 virtual machine. The code is contained in a shared folder on the host machine that is mounted on the virtual machine and configured as a virtual host in apache.

darth_mall
  • 101
  • 2

1 Answers1

0

It seems this is a known problem that has to do with VirtualBox's shared folders. I found a workaround for the Apache configuration:

EnableSendfile Off
darth_mall
  • 101
  • 2