Some web pages do that and it's simple why. Code that doesn't handle long runs.

Prevent it? Close the app or pages.