Page Lifecycle API enables efficient resource utilization for web pages. It is important to provide a good user experience. A Browser API Every Frontend Developer Should Know.
As users, we always like to multi-task while browsing web pages. So it’s common to have several browser tabs open as it helps to get things done in parallel. However, at the same time, each of these tabs consumes system resources like memory and CPU.
Since it’s impossible to limit users from opening new browser tabs and leaving them behind, browsers have taken several measures to deallocate resources when the browser tabs aren’t active.
Modern browsers today will sometimes suspend pages or discard them entirely when system resources are constrained — Philip Walton
So you might wonder why we need to worry about this, as it is taken care of by the browser?