←back to thread

189 points thunderbong | 2 comments | | HN request time: 0.811s | source
Show context
redbell ◴[] No.41412932[source]
Speaking about LAN, today, I encountered an unexpected event I had never imagined or experienced before.

I was working on a simple HTML/CSS game in VS Code, with Live Server running on port 5500 to serve the site. Feeling a bit tired, I decided to take a break. I put my Windows PC to sleep and moved to another room in my house. There, I spotted my Android tablet and thought it would be interesting to see how the game would perform on a tablet.

I unlocked the tablet, opened Chrome, entered my PC's local IP address and port, and hit 'Go'. To my surprise, the loading spinner appeared and spun for about 3-4 seconds. I was puzzled as to why the request was taking so long to get a response, and then it hit me—my PC was supposed to be sleeping.

Yet, just as I was processing this realization, the game’s web page loaded on the tablet. I was stunned, thinking, "Wait a minute—didn't I put my PC to sleep?" I went back to check my PC, and sure enough, it was awake but showing the lock screen. Out of curiosity, I repeated the experiment: I put the PC to sleep again, then accessed the webpage from my phone, and, once again, my PC awoke in response to the request. It was an eye-opening moment to see how the network request could wake my PC from sleep!

I googled this behavior and turned out to be called Wake on LAN or, WOL for short [1].

__________________

1. https://learn.microsoft.com/en-us/troubleshoot/windows-clien...

replies(3): >>41413057 #>>41413078 #>>41414533 #
1. fulafel ◴[] No.41414533[source]
I'd bet on your computer using "modern standby" rather than WoL. Seems unlikely that your tablet would to send the special WoL ethernet packet just from a web browsing context.
replies(1): >>41414608 #
2. ◴[] No.41414608[source]