Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Please add more deatils about all parts in this system that can cache data and server logs showing the relevant requests. –  Dennis Kaarsemaker Apr 27 at 12:19

1 Answer 1

up vote 0 down vote accepted

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.