implement behaviour when page is refreshing

implement behaviour when page is refreshing