ESP32 receiver-webserver's webpage to preserve the data if accidentally the window closes or the refresh-reload button is pressed.

Job ID: 35296970

Budget: €8 – €30 EUR

I made an ESP32 receiver-webserver program (ESP-now protocol in Arduino IDE) but what is missing from my code is the following: I want when we make a refresh on the receiver's webpage the data to be preserved (imagine that 10 senders for example send each of them just a string as their own id for being recognized by the receiver and a char message like "free" or "duty" which make the corresponding region-square for the particular sender green (free) or red (duty) on receiver's webpage. What now happens is: If I refresh the page all the squares start from green. I thought as a solution: the senders to send every for example 30sec the last message that they have sent but that means the senders all the time are awaken up (via timer) so as to send again their last message so as in 30sec maximum the receiver's webpage will be updated. But that's energy consuming solution. The matter is if something can be done in receiver's side for solving this issue. For example keeping in the ESP32 memory some values (this is a bit risky writing all the time into the memory) or through Javascript code perhaphs. I am here to hear your opinion-solution so as to hire you.
Related categories: JavaScript C++ Programming Arduino Web Hosting