Does the session_end function in Global.asax fire when the session times out or when the person on the page clicks something after the session times out?

For example, would this work in Global.Asax :

Sub Session_End
Response.Redirect("./LoggedOut.aspx")
End Sub