You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/01/22 16:55:50 UTC

[GitHub] [cordova] onelsonic opened a new issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats

Posted by GitBox <gi...@apache.org>.
onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats
URL: https://github.com/apache/cordova/issues/194#issuecomment-577901198
 
 
   Hi @breautek,
   we then get some faster downloads of the final app from the stores.
   App size is reduced overall using Gzip/Deflate.
   While added loading times are marginal so it's a win-win.
   Files are compressed and packaged in the app beforehand, so no need to compress on the fly,
   only the decompression.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] onelsonic commented on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats

Posted by GitBox <gi...@apache.org>.
onelsonic commented on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats
URL: https://github.com/apache/cordova/issues/194#issuecomment-577901198
 
 
   Hi @breautek 
   > we then get some faster downloads of the final app.
   App size is reduced by 46% overall using Gzip/Deflate.
   While tested loading times are only 10% longer so it's a win-win.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats

Posted by GitBox <gi...@apache.org>.
onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats
URL: https://github.com/apache/cordova/issues/194#issuecomment-577901198
 
 
   Hi @breautek,
   we then get some faster downloads of the final app from the app stores.
   App size is reduced by 46% overall using Gzip/Deflate.
   While tested loading times are only 10% longer so it's a win-win.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] breautek commented on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats
URL: https://github.com/apache/cordova/issues/194#issuecomment-577709187
 
 
   Can you tell me the point of this?
   
   compressing files are generally only beneficial when you're sending that file through the network. The files inside your cordova `www` folder are being loaded directly from the filesystem, so no network is involved here. If anything, I think  this will result of longer loader times because it needs to compress and then decompress before the browser can start parsing.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats

Posted by GitBox <gi...@apache.org>.
onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats
URL: https://github.com/apache/cordova/issues/194#issuecomment-577901198
 
 
   Hi @breautek,
   we then get some faster downloads of the final app from the stores.
   App size is reduced overall using Gzip/Deflate.
   While added loading times are marginal so it's a win-win.
   Files are compressed and packaged in the app beforehand, so no need to compress them on the fly,
   only the decompression is required.
   We should have the option to do it like in previous versions.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] breautek closed issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats

Posted by GitBox <gi...@apache.org>.
breautek closed issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats
URL: https://github.com/apache/cordova/issues/194
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats

Posted by GitBox <gi...@apache.org>.
onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats
URL: https://github.com/apache/cordova/issues/194#issuecomment-577901198
 
 
   Hi @breautek,
   we then get some faster downloads of the final app from the stores.
   App size is reduced overall using Gzip/Deflate.
   While added loading times are marginal so it's a win-win.
   Files are compressed and packaged in the app beforehand, so no need to compress them on the fly,
   only the decompression is required.
   We should still have the option to do it.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats

Posted by GitBox <gi...@apache.org>.
onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats
URL: https://github.com/apache/cordova/issues/194#issuecomment-577901198
 
 
   Hi @breautek,
   we then get some faster downloads of the final app from the app stores.
   App size is reduced by 46% overall using Gzip/Deflate.
   While tested loading times are only 10% longer so it's a win-win.
   Files are compressed and packaged in the app beforehand, so no need to compress on the fly,
   only the decompression.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats

Posted by GitBox <gi...@apache.org>.
onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats
URL: https://github.com/apache/cordova/issues/194#issuecomment-577901198
 
 
   Hi @breautek,
   we then get some faster downloads of the final app from the stores.
   App size is reduced overall using Gzip/Deflate.
   While added loading times are marginal so it's a win-win.
   Files are compressed and packaged in the app beforehand, so no need to compress on the fly,
   only the decompression.
   We should have the option to do it.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats

Posted by GitBox <gi...@apache.org>.
onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats
URL: https://github.com/apache/cordova/issues/194#issuecomment-577901198
 
 
   Hi @breautek,
   we then get some faster downloads of the final app from the stores.
   App size is reduced overall using Gzip/Deflate.
   While added loading times are marginal so it's a win-win.
   Files are compressed and packaged in the app beforehand, so no need to compress them on the fly,
   only the decompression is required.
   We should have the option to do it like in previous versions.
   Small size files are necessary for mobile Apps.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats

Posted by GitBox <gi...@apache.org>.
onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats
URL: https://github.com/apache/cordova/issues/194#issuecomment-577901198
 
 
   Hi @breautek,
   we then get some faster downloads of the final app from the app stores.
   App size is reduced overall using Gzip/Deflate.
   While added loading times are marginal so it's a win-win.
   Files are compressed and packaged in the app beforehand, so no need to compress on the fly,
   only the decompression.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] breautek commented on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats
URL: https://github.com/apache/cordova/issues/194#issuecomment-577931170
 
 
   I see. This would require significant changes on the native side of each platform. The browser gzip functionality is part of their network stack, so it is not used when files are being loaded from the filesystem, which means each native implementation would have to include a gzip implementation and override resource loading (if that is even possible)
   
    I don't consider this a win-win, especially for the level of maintenance (high-risk to be app-breaking if something goes wrong) that would be required in the future.
   
   > We should have the option to do it like in previous versions.
   
   Cordova has never had a feature that compresses the `www` directory or any file inside that directory. It simply copies the files to the native app project that it manages for you. 
   
   Cordova can use a remote URL as it's content loading point, and the webserver can use gzip so perhaps this is what you were thinking about, but this is **NOT** the recommended approach for final deployments, as it can be a reason for app rejection from the app stores.
   
   Don't forget that, at least on android, APKs are already compressed (they are simply zip files afterall). I think it's safe to assume that the iOS IPA files are also compressed, though I don't know for sure.
   
   If you want this kind of functionality, it would be better suited as a cordova plugin.
   
   For the reasons above, I'll be closing this ticket.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats

Posted by GitBox <gi...@apache.org>.
onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats
URL: https://github.com/apache/cordova/issues/194#issuecomment-577901198
 
 
   Hi @breautek,
   we then get some faster downloads of the final app from the stores.
   App size is reduced overall using Gzip/Deflate.
   While added loading times are marginal so it's a win-win.
   Files are compressed and packaged in the app beforehand, so no need to compress on the fly,
   only the decompression.
   We should still have the option to do it.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats

Posted by GitBox <gi...@apache.org>.
onelsonic edited a comment on issue #194: unable to Gzip and Deflate compression in root www folder for multiple file formats
URL: https://github.com/apache/cordova/issues/194#issuecomment-577901198
 
 
   Hi @breautek,
   we then get some faster downloads of the final app.
   App size is reduced by 46% overall using Gzip/Deflate.
   While tested loading times are only 10% longer so it's a win-win.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org