I have to make a system where the user sends a message and the one who receives it, sees the number 1 on the menu side, at the time the message is received. Like facebook, when you get a notification gets the number 1 on the side of the globe. I wanted to know if anyone has a clue how to do this, I was thinking of doing it using the setTimeOut
of jQuery function and making it refresh every 2 seconds to check something new relative to the user it received.