In the same series as the previously posted Suncalc 3D I’ve stumbled upon AirStrike, a JavaScript Flight Control clone that weighs less than 10kB (!).
What’s so clever about this app is that the source is encoded into a .png
, a technique that’s been around for quite a while as it turns out (2008!).
Pretty decent results and even for packed (or otherwise minified) scripts we can shave off another 50% using this method. The PNG’s can even be further compressed using various optimizing tools.
Hacky. I like!
PNGStore – Embedding compressed CSS & JavaScript in PNGs →
Compression using Canvas and PNG-embedded data →
Interesting, but what about security?
It’s JavaScript, don’t see any reason to secure the code (it’s plaintext, ergo it can always be de-obfuscated, de-minified, etc.)