Top 10 tips for 2025
jeffalo has a redirect button which can send all online users to a new url. he’s used it several times.
Here’s the client side code:
o.on("redirect", (function(t) {
window.location.href = t
})),
(pretty simple)
How it works: when online, all browser tabs connect to a socket.io server. this is how you get real-time stuff like live messages count. It sends a message telling everyone’s browser to redirect. This is the most genius use of socket.io I’ve ever heard
This is true
Lol how are people who joined *after* i made that post (which was partially a joke btw) still using the hashtag
ok fixed. Please be aware though this could be a breaking change as now it returns a promise
ok I figured out how to fix it