-->
Page 1 of 1

Larger website code (html,java,css)

PostPosted: Sun Apr 16, 2017 9:37 am
by JoachimPetersen
The problem is now that when I try to load the large website(around 500kb) to the esp with server.send or server.sendContent; it crashes and restarts when I try to connect to it with my webbrowser, so it must get a overflow somewhere? how would I go about and handle this long string in RAM and serve it as an HTML website on the ESP8266?
onst static char website_servlet_html[] PROGMEM = "500kb long string";
to avoid java regex error in arduino IDE I used like;
const static char website_servlet_html[] PROGMEM = "512 long string"
"512 long string"
"512 long string"
"And so on";
Now how do I serve this large string and avoid overflow crashes due to ram?

Re: Larger website code (html,java,css)

PostPosted: Sun Apr 16, 2017 10:13 am
by martinayotte
With PROGMEM, you need to use server.send_P() or server.sendContent_P() instead.