HTML file sizes

Hello there and thanks in advance,

together with two friends I am developing a small 2D project with around 5-10 levels right now and succeeeded in building and deploying it as HTML5-version without any big issues using the unreal frontend and emscripten. It’s working quite well (on a local machine), but I will have to keep the file sizes down for hosting it online. At the moment I have (everything created by the frontend):

  • index.html (renamed from PROJECTNAME.html) at 10kb
  • json2.js at 18kb
  • jstorage.js at 31kb
  • moz_binarystring.js at 6kb
  • PROJECTNAME.data.js at 229kb
  • PROJECTNAME.data at 32,324kb
  • UE4Game.js.mem at 10,207kb
  • UE4Game.js at 173,426kb (!)

So now I wonder how to shrink down those immense file sizes, especially those of my gamedate (PROJECTNAME.data) and the UE4Game.js. I read this thread about Tappy Chicken (Tappy chicken HTML5 size inconsistencies? - Platform & Builds - Epic Developer Community Forums) and learned, that they used compressed javascript (.jgz files) in order to lower the file sizes dramatically. Can I achieve my goal by doing the same and if yes, how?

Greetings

M.

Have a look at this similar question, there is an example on how to use compression, too. Also checkout the options to know how much space is used by which assets (e.g. by using memreport) (optimizing).

Apart from gziping. Build the Shipping configuration which is meant for final distribution, that will cut out a lot cruft which a development build contains for well, development ( logs, assertion, stats etc)

Thanks trutty, I don’t know why I din’t find that question when I searched for my topic. The tutorial for optimizing memory also looks quite promising. I will follow the advice in the other thread. That should work out a solution for my problem.

Thanks , selecting shipping reduced the size in half. That’s a huge stop forward. I will follow truttys tips for further file size reduction.