how to detect user has clicked back button

how to detect user has clicked back button

how do i detect user has clicked back button of browser
and i want to prevent it from redirecting to back page
i dont want to disable the back button