Webgl compressed file question

When i build for webgl there is a compressed folder along with release and template data folder.
How do i use this compressed folder to upload my game, Is there any tutorial. Currently uncompressed folder seems to be too big.

I don’t think that there is a general guide for this. In general what you need to do – is to serve compressed files with Content-Encoding: gzip header. How to do depends on how you serve the game.
Where are you uploading your builds?

That is correct - the files need to be served with the gzip header from whatever wrb server that is hosting the game.

Also, the build output looks for files under the Release folder, and not the Compressed folder.

We only upload the Compressed folder to our server and rename it to Release.

Works like a charm for us.

Generally i upload my games in dropbox for initial testing then to my website hosted by hostgator for further testing.

Can you tell me how to server files with gzip header

I am not sure you can set Dropbox to serve those files with gzip…

We use Amazon S3 where you can set that.

That’s interesting, I’ve been testing my games using Dropbox whilst the main site gets configured for delivering webGL, does this mean that Dropbox may be slower than on the actual site, if it’s not serving with gzip?

Can any1 point to any tuorial or procedure on how to server gzip file

It totally depends on your webserver backend. If it’s apache-based, then the .htaccess file Unity bundles with your build should do all the work. Otherwise you need to read up on how to configure your webserver.

As far as I can see, it’s not possible to configure DropBox in this way, but I don’t use it myself.

1 Like

how do i find if my webserver is apache based??

Hi, it looks like for Hostgator they will automatically decompress the gzip: http://support.hostgator.com/articles/cpanel/how-to-use-gzip

Thus I assume you only need to upload the Unity compiled compressed files and server will decompress, etc?

Thanks for the info. I am assuming at this stage gzip decompressing by the server, etc. is widely available on shared hosting plans, etc.

I don’t really know, but i assume it is. We used Amazon S3 and we could set the file headers to gzip there.

1 Like

Yeah I think Hostgator and Cpanel-type hosting handle the gzip automatically. This is good news since the user downloads a much, much smaller file. Working on some WebGL stuff right now, hope to update you all tonight :slight_smile:

1 Like