Hi all I have the below set of code $(window).unload( function() { test(); }); the test() will call when i close the window and also if i refresh the window ..... How can identify is it a refresh or close event . I need to call test() only at close event. Please help me...