HTML5 Game hosted on godaddy - won't load

I’m trying to host my Unreal Project on a Website.

I’ve packaged my project to HTML5 and would like to host it using godaddy. When I run the project on my local machine using the ‘HTML5LaunchHelper.exe’ it works fine with no issue. When the project is packaged it creates the following files.

I’ve troubleshooted the problem a bit myself and lots of people are suggesting removal of the “gz” files which I’ve done.

I’ve uploaded the following files to my godaddy hosting account but get the following error,
“Uncaught could not load memory initializer UE4Game.js.mem”

Lots of people are also suggesting changing the .htaccess file but my .htaccess file contains the following and I’m not too sure what to do with it;

203219-htaccess.jpg

Can anyone please suggest a solution to my problem. Any help would be greatly appreciated.

Thanks

A good tool to debug what a web server is doing with your files is to use Firefox’s Network Monitor tab. See here:
Click on the Network tab, then choose Headers, and then look in the “Response Headers” section.

There are two headers that are important to check: Content-Type and Content-Encoding. The web server uses these to tell the web browser how to treat the files it has received. The correct headers that should be present for the different files are:

  • *.data, *.mem, *.symbols:

    Content-Type:
    application/octet-stream

    Content-Encoding: not present, or
    “identity”

  • *.datagz, *.memgz, *.symbolsgz:

    Content-Type:
    application/octet-stream

    Content-Encoding: gzip

  • *.js:

    Content-Type: application/javascript
    or application/x-javascript

    Content-Encoding: not present, or
    “identity”

  • *.jsgz:

    Content-Type: application/javascript
    or application/x-javascript

    Content-Encoding: gzip

  • *.html:

    Content-Type: application/html

    Content-Encoding: not present, or
    “identity”

If you don’t see the web browser showing these, then something in the web server configuration is not correct.

The following files do not need to be hosted online and you can delete them:

  • HTML5LaunchHelper.exe
  • Readme.txt
  • RunMacHTML5LaunchHelper.command

If you choose to serve precompressed files, then only the *gz variants of the files need to be hosted online and you can delete the non-*gz variants of these files (and vice versa). When serving precompressed files, make sure you have the “const serveCompressedAssets = true;” directive set in the .html file (UE 4.16 and newer). You mentioned UE 4.13 here - upgrading to latest UE 4 version is definitely recommended, since there have been many fixes to HTML5 output since. The UE 4.16 .html loader file is also able to troubleshoot some of these loading issues.