I'd debug this by creating a function to replace all calls to client.print(). In the new method, do a client.print() and a Serial.print() with the same data. If the serial monitor shows the data correctly, but the browser does not, upgrade to Firefox.
If both are wrong, fix your code.
Good idea. I tried it, but was stumped on how to pass the pointer to the function:
Standard way:
EthernetClient client = = server.available();
client.println("<HTLM xxx>");
client.println("<HTML yyy>");
Passing by function:
EthernetClient client = = server.available();
void Func1(EthernetClient clientptr) {
clientptr.println("<HTML xxx>");
clientptr.println("<HTML yyy>");
}
Loop() {
Func1(client)
}
By this does not seem to work.
Do anyone know of an example with a lot of HTML on a SD card, which is loaded and served to the client (I could then just modify this example)?
Thanks
Klaus