So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By renegade
#73734 Hi everyone. I am usng this WiFi Manager library : https://github.com/tzapu/WiFiManager/

It's good, but I would vastly prefer to serve my html, css & js from the flash memory.

Can somebody offer an example sketch which serves the in memory pages, from the filesystem instead of the ones in memory?

I have read and tried changing the server to a SPIFFS server(https://github.com/r-downing/SPIFFSReadServer) rather than a ESP8266WebServer, but the result is never stable. Please offer an example of how this can be done.

My current effort is attached to this post.

Please help!
You do not have the required permissions to view the files attached to this post.
User avatar
By rudy
#73736 https://github.com/gmag11/FSBrowserNG

or for a simpler one look in the example files for ESP8266WebServer - FSBrowser
https://github.com/esp8266/Arduino/tree ... /FSBrowser

I hope you are taking into account the limited number of simultaneous connections the ESP8266 can handle. Browsers will fire off as many requests as it can and that will make the ESP choke. If you have more than a few files to serve then you need to consider how to prevent the browser from calling all of them at once.
User avatar
By renegade
#73742 Hi Rudy, ahhh! This may be the problem. How would you advise doing them one at a time? I have the html, 2 css files and a js.

A guess that would likely result in 3 browser requests in very quick succession. I will also need to somehow mash the WiFiManager together with this FSBrowser library by the looks of things. Sound right?
Last edited by renegade on Tue Feb 06, 2018 4:18 am, edited 1 time in total.
User avatar
By Pablo2048
#73744 You can also use AsyncWebServer ( https://github.com/me-no-dev/ESPAsyncWebServer ), use this with serveStatic example... CSS files can be joined (actually html+css+js can be joined). IMHO AsyncWebServer can handle upto 5 connections (limit of ESP SDK/Core).