I’ve been stumbling through getting WebGL to load the compressed files, and I think I got it working in Chrome, but Firefox has stopped loading the WebGL player. Can someone tell me what I’m doing wrong?
Here it is (the giant red thing is me testing stuff):
http://getinspir3d.com/inspir3d-viewer2/index.html
And here is all my info:
Unity Version: 5.1.0f2
WebGL Player Settings:
I tested it with the profiler and I am using about 170mb max, so 256mb should be fine.
htaccess file (standard generated one):
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteRule (.*)Release(.*)\.js $1Compressed$2\.jsgz [L]
RewriteRule (.*)Release(.*)\.data $1Compressed$2\.datagz [L]
RewriteRule (.*)Release(.*)\.mem $1Compressed$2\.memgz [L]
RewriteRule (.*)Release(.*)\.unity3d $1Compressed$2\.unity3dgz [L]
AddEncoding gzip .jsgz
AddEncoding gzip .datagz
AddEncoding gzip .memgz
AddEncoding gzip .unity3dgz
Web Host: siteground.com
Plan: Startup Account: Web Hosting Crafted For Top Website Performance & Speed - SiteGround
inside cPanel I added the file extensions unity WebGL uses for the gzipped files:
I wasn’t sure if I needed the dot in the extension (.jsgz vs jsgz) so I added both versions as application/octet-stream
I also enabled “Optimize Website” to compress application/octet-stream in cPanel (not sure if I needed to or not):
It works fine locally on Firefox, but when its uploaded I get a “SyntaxError: illegal character” coming from the javascript files. When I click on the link to check out where the error is coming from all I see is a bunch of symbols:
Any help would be much appreciated. I am kind of new to WebGL and haven’t found many tutorials on how to set up WebGL with a web host and get the compressed files to load.
Thanks!
-Ben



