1

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/

Intuitisoft
  • 1,390
  • 1
  • 9
  • 18
  • Check that answer: http://stackoverflow.com/questions/1922934/how-to-disable-mod-deflate-in-apache2/1923028#1923028 it may be enough in your case – regilero Jun 05 '14 at 11:56
  • @regilero I add the code ` SetEnv no-gzip 1 ` to the .htaccess but nothing change. – Intuitisoft Jun 05 '14 at 12:34

0 Answers0