For those that program on embedded hardware like Esp32.
If you send a html header for “Content-Encoding” with a value of “gzip” first then you can send compressed data rather than html plain text.
Ive just got a small script that read the .html files in the project folder and saves a copy with .gz or .txt containing a c byte array which can be copy pasted into the c source.
This is obvious if you know anything about the internet, but I just hadn’t looked at it since I was still trying to get things working.
Even for my small pages this on the browser side reduces 8k to 1.2k.
While this isn’t really large amount of data by modern standards, it is noticeable on the user side in browser having the page appear quicker. Since even the 10 year old android I’m, testing on has 4x 1.5ghz and 4x 2ghz cores, compared to the esp32 with 1 or maybe 2 cores at 240mhz. The decompression is faster on the phone cores than the delayed in sending more data by the slower esp32.
By
Gripless ·