Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By GastonMelo
#91320 Hi to all,
I have an esp8266 as webserver like the example WiFiHTTPServer. I'm sending the html page like this:
Code: Select all  client.print(header);

I want to know if is possible to send the html page encoded in gzip in the form:
Code: Select allindex_html_gz[]={0x10.........0x20}

I already coded the html page using cyberchef.
User avatar
By btidey
#91324 Yes.

If you return with header attribute “Content-encoding: gzip” then the browser will unpack the contents correctly.

I do this all the time with gzip files stored in filing system in the ESP8266. It is not just html that can be handled like this but css javascript etc.
User avatar
By GastonMelo
#91325 thanks for the quick reply,
i send this:
Code: Select all  client.println("HTTP/1.1 200 OK");
  client.println("Content-Encoding: gzip");
  client.println("Content-Type: text/html");

where index_html_gz is the html gziped. They did receive the gzip html but only display a white windows.