LifeCycle for mainpage