How to compress javascript html5 files in 4.11?

Hi :slight_smile:

My html5 builds are getting bigger sizes comparing with 4.10 (76mb in 4.11) (36mb in 4.10) .
Is there a way to config new settings to get compressed files as was in 4.10?

Tried shipping settings but still got uncompressed files.

anyone???

Hey ,

[This post][1] may be of some assistance to you regarding compression of files.

Thanks!

[HTML5] UE4Game.js size - Platform & Builds - Epic Developer Community Forums

The Javascript compression feature is something that browsers implement “transparently”, so when used for UE4, Unreal Engine doesn’t really even know it had received compressed data, but browser decompresses the data under the hood and UE4 is fed uncompressed data.

The trick to doing this in web servers is two-fold:

First is to gzip-compress the individual files. This is something that UE4 export already did for you automatically and you get the .js.gz etc. files in the output directory.

The second critical step is that the web server in question must be configured that the file to be served is gzip-compressed, and that the browser that downloads the file should decompress it before passing it to JavaScript. The web server tells that by passing the “Content-Encoding: gzip” header when the file is fetched. The way this configuration is done depends on the web server you are using. The answer linked to above shows how to do it for the Apache web server if you are using that. If you are using e.g. Amazon S3 CDN instead, then see this link which comments how to perform the configuration: Serving compressed (gzipped) static files from Amazon S3 or CloudFront – RightBrain Networks . If you are using some other web server, you might find hits by searching for "serving precompressed javascript gzip " in , or similar.