"configure your web server to host .unityweb files using gzip compression"

Hi guys,

I’m trying out my game as WebGL but the loading takes forever and the game is only 35MB. I actually thought it crashed but after 10 minutes it finally did start.

The Google Chrome developer log showed me this:

I have bold’ed the two interesting parts.

I am already publishing to gzip (see attached screenshot), so what does the comment mean about hosting .unityweb files using gzip compression? What is it referring to?

Also, what can I do about the WebAssembly.Module error? Is it the reason why everything loads so slow?

Thanks. :slight_smile:

1 Like

+1 I have the same question.

1 Like

no answers…great!

You have to configure the server where your game is hosted to serve the files with the header “Content-Encoding: gzip” or br for those that use brotli.

2 Likes

As this is the top search on it - see manual here!:

2 Likes

how do you configure it though? is it just placing files in the right folder, or something more? having same issues. edit: got it, yeh just had to edit the file and do a bit of trail and error it works, amazing! loving unity and webgl right now.

lol back to this the htaccess file doesnt seem to be working when i compressed with brotli, or maybe i missed something simple.

The htaccess configuration for brotli is different than gzip and uncompressed. make sure you have the right configutarion