Some web pages do that and it's simple why. Code that doesn't handle long runs.
Prevent it? Close the app or pages.
I often leave applications on overnight, and to minimize power consumption, leave as few as possible running. Most often, I will leave Bitlord and MSI Gaming App on overnight while I'm downloading something. MSI Gaming App was just to keep my computer at low power consumption. However, often times when I wake up in the morning, both of the applications will have stopped responding, and I'll be left with two "BitLord/MSI Gaming App is not responding" error messages. Obviously this is problematic because my downloads will stop in the middle of the night.
Why does this happen, and is there any way to prevent it?

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic