-->
Page 6 of 9

Re: ESP8266 eMbeddedWebserver at SoC without extern MCU

PostPosted: Sat Dec 13, 2014 8:09 am
by bkrajendra
alonewolfx2 wrote:It's too slow :(

Its fixed now!
Im using GZIP compressed js and css now
make following changes to make it work.

in httpd.c:
Code: Select allstatic const MimeMap mimeTypes[]={
   {"htm", "text/htm"},
   {"html", "text/html"},
   {"css", "text/css"},
   {"js", "text/javascript"},
   {"txt", "text/plain"},
   {"jpg", "image/jpeg"},
   {"jpeg", "image/jpeg"},
   {"png", "image/png"},
   {"gif", "image/gif"},
   {"ico", "image/x-icon"},
   {NULL, "text/html"}, //default value
};


in httpdespfs.c:
Code: Select all      
char *url;
      url = connData->url;
      //Go find the extension
      char *ext=url+(strlen(url)-1);
      while (ext!=url && *ext!='.') ext--;
      if (*ext=='.') ext++;

      if (os_strcmp(ext, "css")==0 || os_strcmp(ext, "js")==0)
      {
         httpdHeader(connData, "Content-Encoding", "gzip");
      }


enjoy!

Re: ESP8266 eMbeddedWebserver at SoC without extern MCU

PostPosted: Sat Dec 13, 2014 8:45 am
by alonewolfx2
its faster than old one. but bootstrap.css is 115kb :) i am looking small ui alternatives like pure( >20kb )

Re: ESP8266 eMbeddedWebserver at SoC without extern MCU

PostPosted: Sat Dec 13, 2014 12:57 pm
by bkrajendra
alonewolfx2 wrote:its faster than old one. but bootstrap.css is 115kb :) i am looking small ui alternatives like pure( >20kb )


But after gzip bootstrap css and js becomes less than 20kb

Re: ESP8266 eMbeddedWebserver at SoC without extern MCU

PostPosted: Sat Dec 27, 2014 5:05 am
by Adex
What version of SDK are you using?