Good morning. This is a conceptual question. I never needed it, so I do not know if it works.
Imagine the following situation: I have a script A, where I enter information into the database. This script is running 100%.
I have a B script, where I keep track of the information entered in the database. I put a refresh every 10 seconds, every 10 seconds to update the information entered through script A.
The problem in question is as follows. I wish I did not need to have this Refresh in script B, and every time script A inserted a record in the DB, script B was updated automatically. It does not even have to be via ajax, it can be via refresh from the entire page itself.
Maybe to help in visualizing the problem, I'll tell you the application of the situation. I have a restaurant where the attendants are on the cell phone, taking the orders on the table (SCRIPT A). In the kitchen, I have a monitor where you update every 20 seconds (SCRIPT B) the items ordered in the restaurant hall.
The issue is that I do not want to keep updating every 20 seconds because there are times when the restaurant has a very quiet pace and this would generate unnecessary system consumption (bandwidth, link, system performance, etc., etc.). etc.).
Is this possible?