Serving up HTML / CSS / JavaScript - Generic Question

MartinG0PJO
Posts: 3
Joined: Wed Nov 14, 2018 12:35 pm

Serving up HTML / CSS / JavaScript - Generic Question

Postby MartinG0PJO » Tue Nov 20, 2018 2:44 pm

Hi,

I've been trying to serve HTML and associated CSS and JS files from an ESP32 Dev Module. The files being server reside in SPIFFS and that all seems to work as expected. The problem I'm having is that some file requests are simply not seen.

I was wondering in anyone actually had the ESP32 serving up such HTML / CSS / JavaScript files and which web server code they were using? I'd also be interested to know how quick they found the device?

Many thanks

Martin

SherwoodBC
Posts: 1
Joined: Tue Dec 04, 2018 1:53 am

Re: Serving up HTML / CSS / JavaScript - Generic Question

Postby SherwoodBC » Tue Dec 04, 2018 2:13 am

I am having exactly the same issue.

I have a web page that references 8 files; 2 large (i.e. 20k) image files, two small button icons, favicon.ico and 3 css files. All are stored on the SPIFFS and can be read.

When I print what is being requested in my not found routine, only 2, 3 or 4 of these files are ever requested. Not always the same ones, although it is far from random with the same ones usually requested.

I originally developed this on the ESP8266 where everything works properly and all 8 files are always requested and downloaded.

I use exactly the same code (same project) for both and just select one processor or the other. The only difference in my code between the two processors is the detection of the reset reason and some macros that handle the difference in directory handling for the two versions of SPIFFS. The HTML and other files are exactly the same.

Same thing on both Edge and Chrome.

MartinG0PJO
Posts: 3
Joined: Wed Nov 14, 2018 12:35 pm

Re: Serving up HTML / CSS / JavaScript - Generic Question

Postby MartinG0PJO » Tue Dec 04, 2018 8:56 am

Hi,

I resolved the issue by moving over to the https://github.com/me-no-dev/ESPAsyncWebServer WebServer. I know having to change code and add extra libraries is a pain but it did work and I am now proceeding with my project. I'm only serving three files so I'd be interested to know how you get on with more.

Do let me know.

Martin

Who is online

Users browsing this forum: No registered users and 54 guests