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:
static 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:
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!