Cant run unity webgl build with gzip or brotli compression
Im trying to run webgl build with gzip compression but I only manage to run it with compression format disabled in the player settings. I tried different servers like link:http-server with --gzip option enabled.
 http-server --gzip
I also run link:spa-server-gzip .
 spa-server-gzip
It gives me this output in the inspector: 
As you can see the Content-Encoding is set to gzip but Im getting this error message:
 Uncaught SyntaxError: Invalid or unexpected token gzip.framework.js.gz:1 
 Uncaught ReferenceError: unityFramework is not defined at HTMLScriptElement.r.onload (gzip.loader.js:1) gzip.loader.js:1 
Why is this not working?
How can I run my unity webgl build with gzip or brotli compression?
Answer by Ntalam · Sep 19, 2021 at 12:27 PM
Have you check the server configuration? https://docs.unity3d.com/Manual/webgl-server-configuration-code-samples.html
Your answer
 
 
             Follow this Question
Related Questions
Error after compiling WebGL 1 Answer
WebGL build failed running python and emcc 1 Answer
Export WebGL failed 0 Answers
Is it possible to stream WebGL render to the client ? 0 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
               
 
			 
                