So basically my ajax function is refreshing all the time, and I\'d like that it just refreshes when a change on database is detected. Is there a way of doing this? Thank you