Webserver SSI and JQuery

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hi,

I've implemented a webserver using the hexagon application kit. As described in other posts, I've enable SSI's by defining LWIP_HTTPD_SSI 1.
I've created a HTML file and saved it to my SD card as index.ssi. I can get data from my browser using the cgi handlers and write data to it using the SSI's. All works well.

The HTML code includes some JQuery. If I save the html code as .HTML, when I open the html file from the the SD card directly, the JQuery code runs. When the File is saved as .ssi and run from the webserver, Jquery does not run, I get just the basic HTML page or I get the browser showing me the html code.

What I want to do is have the microcontroller serve my HTML page, with my SSI's using JQuery? any help would be appreciated.

Thanks
0 Likes
1 Reply
Not applicable
Hello.
You could try to activate dynamic headers in "httpd_structs.h" of the HTTPServer.

/** Set this to 1 if you want to include code that creates HTTP headers
* at runtime. Default is off: HTTP headers are then created statically
* by the makefsdata tool. Static headers mean smaller code size, but
* the (readonly) fsdata will grow a bit as every file includes the HTTP
* header. */
#ifndef LWIP_HTTPD_DYNAMIC_HEADERS
#define LWIP_HTTPD_DYNAMIC_HEADERS 1
#endif

If it works, please let us know!
0 Likes