Reload Div Setinterval only when new record

Asked

Viewed 42 times

0

Hello!

I would like to understand how to reload a div only when a new record is performed in the database. The triggering of this action would be like in a setInterval, but not every xxxseconds, but rather when the new Insert or update,delete...

For example, even with the system screen stopped, without any action, I would receive the update of this div when another user performs a new registration on another machine with his login.

Has anyone ever done it, or knows how???

  • Unfortunately this magic does not exist, you will have to check the new content by the client, using an interval or mechanical trigger or keep an active connection to the server as a socket to receive the notification.

  • But with that interval, let’s say every 30 seconds... I’ll have an overload on the server, crashing the system, right? And keep connection as in a socket, how would that be?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.