thanks for M@rco and weirdbeardmt for replying me
i think i need to tell u all more cleary about my problem
in my website i dont want two same user login at the same time so i save some info inside database to detect it and i always want to know whether the user have log out or not.so the user logout got few way
one is prober logout
two is close the window
three is move to other side
one is no problem to me and two and three also no problem (i use onbeforeunload to detect close window and move to other side) but one problem is when i refresh the page that time the onbeforeunload also detect the action and update my database set the user log out so i need to find the solution to detect the refresh
so got any sugggestion or solution to solve this problem?