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 BhattacharjeePosted Sep 24, 2014, 2:21 AM
$(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 BiswasPosted Sep 24, 2014, 2:06 AM
http://stackoverflow.com/questions/2803655/how-to-force-page-refreshes-or-reloads-in-jquery