Hi.. Gud mrng.
I have d requirement that if the user clicked refresh button or f5 I need to redirect the page to Login page..
I had done with browser close using
$(window).bind('beforeunload', function (e) {
//my logiic
});
But i failed in the refresh or pressing f5..
if u know .
plz help me..
Thanks,
Honey..

Arunava BhattacharjeeRank #635 · 3.8K reputationPosted Sep 23, 2014, 10:21 PM EDT
$(document).keydown(function(e)
{
if (e.which == 116) // key code of the F5 button
{
document.location.reload();
} });
Thanks, If this works mark the answer as accepted.
Dipankar BiswasRank #992 · 2K reputationPosted Sep 23, 2014, 10:06 PM EDT
http://stackoverflow.com/questions/2803655/how-to-force-page-refreshes-or-reloads-in-jquery