0

This has been driving me crazy.

Somehow when ever apache serves the following file:

$().ready(function(){
    hideDataSetSelection();
    var selector = "select#interface";
    alert($(selector + "").val());
});
function hideDataSetSelection(){
    $("div#dataBtn").hide();
}

function showDataSetSelection(){
    $("div#dataBtn").show();
}
abc
xyz
123
456

It actually outputs the following:

function hideDataSetSelection(){
    $("div#dataBtn").hide();
}

function showDataSetSelection(){
    $("div#dataBtn").show();
}

$().ready(function(){
    hideDataSetSelection();

    var selector = "select#interface";
    alert($(selector + " option:selected").val());
al

Which actually has content from a 'previous' version of the file. This seems to occur for files that end in js or json only. Depending on the contents of the file, the output will get scrambled. I can only imagine that Apache is caching the file incorrectly or something...

This is within a Virtualbox environment.

Any ideas what the cause of this issue might be?

Chris Stryczynski
  • 30,145
  • 48
  • 175
  • 286

1 Answers1

0

My issue has been solved by turning off sendfile. It seems the same issue has been described here: Vagrant/VirtualBox/Apache2 Strange Cache Behaviour

Chris Stryczynski
  • 30,145
  • 48
  • 175
  • 286