When I get an url that contains <script src="some-file.js"></script>
as the follow example:
<html>
<script>
$(document).ready(function(){
$.get('/some-url', function(r) {
$('#html-container').html(r); // Contains: <script src="some-file.js"></script>
});
});
</script>
<body>
<div id="html-container"></div>
</body>
This is result as sayed before in a autoload from some-file.js
as result from /some-url
than jQuery will add ?_={random number}
to query string.
Resulting in the request: GET some-file.js?_=1365695139815
How can I disable this random request append from autoload from html() parse?
@edit
Since I can't make the request, it's because they are executed by html parse, with the Brian's answer I found this simple solution:
$.ajaxSetup({
// Enable caching of AJAX responses
cache: true
});