I try to make a speedtest with a 1 mo file on my webserver. The file is call with ajax request but when I call the 1mo file on Google Chrome the size downloaded is 9.0KB. I think is because on the header "Accept-Encoding" is set to "gzip,deflate,sdch"
How I can set the Accept-Encoding to none to download a real 1mo file ?
the file is name 1mo.file
javascript
$(function () {
console.log('DOM READY');
$('#result').append('DOM READY<br>');
var rand = Math.round(Math.random() * 1000);
$.ajax({
url: "1mo.file?"+rand,
}).then(function () {
console.log('then');
$('#result').append('AJAX CALL<br>');
}).done(function() {
console.log( "done" );
$('#result').append( "AJAX DONE<br>" );
});
console.log('SCRIPT FINISH');
$('#result').append('SCRIPT FINISH<br>');
});
html
<b>speed test :</b><br>
<div id="result"></div>
.htaccess
# for files that end with ".file"
<FilesMatch \.file$>
SetEnv no-gzip 1
</FilesMatch>
You can see the script run on http://intuitisoft.com/apps/speedtest/