How can I know whether refresh button or browser back button is clicked in Firefox? [duplicate]

Use for the on refresh event:

window.onbeforeunload = function(e) {
    return 'Dialog text here.';
};

See Window: beforeunload event.

And

$(window).unload(function() {
    alert('Handler for .unload() called.');
});

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)