ctm / mb2-doc

Mb2, poker software
https://devctm.com
7 stars 2 forks source link

mb2-web.js doesn't appear to be cached and isn't minimized and might not be compressed #1240

Closed ctm closed 9 months ago

ctm commented 9 months ago

Make sure mb2-web.js transfers as few bytes as possible.

The Network tab of the DevTools page suggests that mb2-web.js is not being cached, since I see a 200 for it, but a 304 for mb2-web.wasm. Additionally, looking at the contents, it's not minimized. I don't know how to tell if it's actually being sent zipped, but I can look into that when I look into the other two issues.

ctm commented 9 months ago

FWIW, I tried reloading this morning and got a 304 for mb2-web.js, so I'm not sure what's going on there. I'll still look into minimization.

ctm commented 9 months ago

The JavaScript is being minimized after all. Chrome pretty-prints the output and I didn't look closely last night and notice all the one character variable names. Furthermore, I've verified that the output is sent via br (brotli) compression, so none of my concerns from yesterday evening appear to be valid.

FWIW, I was having some funky network problems at the start of the game which I also had at the start of the game from the previous evening. I don't think its an mb2 issue though because nobody else has reported it.