←back to thread

189 points thunderbong | 1 comments | | HN request time: 0.414s | 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. IgorPartola ◴[] No.41413057[source]
WOL is an old feature where you could even boot a PC that is off, not just asleep, but you had to confine it in the BIOS. It has become less useful with computers able to go into power save modes that are almost as good as having it fully off energy-wise.