Compressing HTML5 files (pako)?
Hello! Okay, so I may just be dumb as I'm still relatively new to the HTML5 scene.
I want to compress my HTML files into .gz files to speed up loading times then unpack them client-side before loading them. I have been using this guide here:
For some reason this works perfectly fine on Firefox and I have no issues whatsoever. If I use Chrome, though, I get "incorrect header check" errors for both the wasm and the pck file and it will never load the game.
You can see if it loads for you here (right-click 'inspect element'):
Now, if I upload it to somewhere like itch.io it works on both browsers with exactly the same pako code.
Has anyone done this before? Are there some peculiarities I am unaware of that would be causing this? Any help on the matter would be great as I have been trying to solve this with little luck for the past week. All I'm doing is loading the game directly to an iframe. The index.html and index.js are modified as explained in the tutorial (I am loading pako from a different part of the server, but other than that it is identical).
Alternative methods would even be appreciated, anything that lowers the load times as 20mb+ per game is really going to turn a lot of people off.
Thank you in advance.