I am using Pjax to retrieve pages on my cakePhp site. I get an error due to the fact that javascript is retrieved again because it sees it as a new file due to the addition of .js to it? _ = Timestamp.
main.min.js? _ = 1425763395728
If the page is requested using ajax, does cakePhp add this? I can’t think of any other reason why he is returning with a timestamp.
I am using CakePhp 2.5
UPDATE:
The problem was jQuery and this helped remove the timestamp.
$.ajaxPrefilter(function( options, originalOptions, jqXHR ) {
if ( options.dataType == 'script' || originalOptions.dataType == 'script' ) {
options.cache = true;
}
});
source
share