get gzipped data by AJAX request
get gzipped data by AJAX request
Dear Support,
I'm interested in how to recieve gzipped data from the server by XHR request?
I'm using this code to enable gzip compression on the server:
ob_start( 'ob_gzhandler' );
header( 'Content-type: application/json; charset=UTF-8' );
header( 'Content-Encoding: gzip' );
But nothing appears in the table :(
Do I need any additional options enable to recieve data by this way?
Thanks for your help and this great plugin!
Best regards
Adam
I'm interested in how to recieve gzipped data from the server by XHR request?
I'm using this code to enable gzip compression on the server:
ob_start( 'ob_gzhandler' );
header( 'Content-type: application/json; charset=UTF-8' );
header( 'Content-Encoding: gzip' );
But nothing appears in the table :(
Do I need any additional options enable to recieve data by this way?
Thanks for your help and this great plugin!
Best regards
Adam
This discussion has been closed.
Replies
http://stackoverflow.com/questions/2956283/decode-gzip-using-jquery-javascript
(I can't vouch for the answer, but it sounds legit.. I believe the browser will have taken care of any decoding of gzip before javascript/DataTables sees it)
this is all beyond the scope of DataTables, but you should detect if the browser sent a header allowing gzip before encoding your data.