Detect the refresh event using JQuery
JQuery function to detect refresh event using JQuery
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<p>
Detecting the page refresh
</p>
JavaScript
$( window ).bind('beforeunload', function()
{
return 'It is going to be refreshed';
});