3 ms·
Do you know how the counter works ? I am a JS noob. I see at the bottom of script he's updating the counter, but who is calling the update ?
by beenpoor 12y ago
Do you know how the counter works ? I am a JS noob. I see at the bottom of script he's updating the counter, but who is calling the update ?
- jgroszko 12y agoChrome devtools shows he's got a WebSocket open. In the Network tab you can filter on WebSockets, find the request, and there's a Frames tab showing all the frames (unfortunately does not update in realtime).
- Rauchg 12y agoIt's a WordPress website that communicates with a Socket.IO server. I wrote about how to accomplish this here: http://socket.io/blog/introducing-socket-io-1-0/#integration http://socket.io/blog/introducing-socket-io-1-0/#integration It's true to the spirit of the post as well: the count gets rendered on the server, then reactive updates come in realtime and the view is updated.