Okay...hoping someone can come up with a programming approach here for me. Been spinning my wheels a bit searching the internet for a solution with no luck.
Running an ESP32 on SoftAp wifi. It is running as a server. In the ESP32 SPIFFS, I have a few web pages stored.
The ESP32 is externally powered, no serial connection. Only Wifi.
The way the system works is someone gets on a browser, and logs into the ESP32 server. This opens a webpage, call it main.html.
The sketch then runs and populates data on the page. And this just loops. No issues here, this is all done and working fine.
But...what I want to do is have multiple html pages; say main.html, main2.html, etc. And I want to run only the portion of the sketch needed to populate the ACTIVE page.
Currently, the entire sketch runs, meaning some of the information being passed is not used, ultimely wasting capacity and bandwidth.
If i can figure out which webpage is being used, then I could run the sketch only for the information required. Ultimately allowing me to use more pages, as I would not overload the system with unused information.
Hopefully that makes sense. Again, I need a way to figure out which webpage is actually in use.
I have tried httpcode. And that works fine...but it really just tells me something is connected and working. Not which page.
I also pulled a http.get() for each page. But since the pages are on the server (ESP32), it literally pulls back the html code for the page, in use or not.
As I have kicked this around, since the ESP32 is the server, the page being used will come from the client(user) to the server. It seems like a just need to be able to see what page was last requested at the server? Maybe?
Anyone have any other thoughts on this. I appreciate it!