I would like to better undestand the webserver concept regarding arduino boards:
I am using the Arduino Ethernet board right now (later the MEGA+ETH Shield) and the webduino library.
I am including right now the jquery.js file in this way:
P(http200Ok) ="HTTP/1.1 200 OK";
P(httpContentJavascript) = "Content-Type: application/javascript";
void loadJS(WebServer &server, WebServer::ConnectionType type, char *url_tail, bool tail_complete){
server.printP(http200Ok);
server.println();
server.printP(httpContentJavascript);
server.println();
server.println();
myFile = SD.open("jquerym.js", FILE_READ);
int16_t c;
while ((c = myFile.read()) >= 0) {
server.print((char)c);
}
myFile.close();
}
The file is about 90KB and it takes too much time to load it.
Is there any better way to menage this? Maybe reading more bytes o others solutions?
I cannot connect the board to internet:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
Is there any lighter verion of this? I tried the mobile version but the result is tha same...
How do U menage this?