onelsonic opened a new issue #194: unable to Gzip and Deflate compression in 
root www folder for multiple file formats
URL: https://github.com/apache/cordova/issues/194
 
 
   on Apache you will setup an .htaccess file to specify the file headers and 
return the correct file format to the client which will decompress it.
   
   in the .htaccess file you will specify the file type and encoding method.
   Here we want to decompress html and js files from GZIP format when the 
client receive the files.
   >>
   AddType text/html .html
   AddType application/javascript .js
   AddEncoding gzip .html
   AddEncoding gzip .js
   
   Am am unable to to the same with the current version of Cordova with the 
files in the root /www/
   
   Is this a bug?
   
   in 2015 you could use some server code in order to do so :
   ```
   require('http').createServer(function(request, response) {
     response.writeHead(200, { 'content-encoding': 'gzip', 'content-type': 
'application/gzip' });
     
require('fs').createReadStream('platforms/platforms.json').pipe(require('zlib').createGzip()).pipe(response);
   }).listen(1337);
   ```
   This is not working anymore.
   
   Can this be added/supported? Similar to what we have on Apache?
   Or is there a new workaround?
   
   If this is not making any sense to you check the below:
   
https://www.apphp.com/tutorials/index.php?page=gzip-and-deflate-compression-in-web-development

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to