I developed a solution which detect when the page is being unload, using on beforeUnload
JS function, the code works fine but I need to do some modifications based in the actions of the user, for instance if the user reload/refresh the page, I need to avoid The code execution inside the onBeforeUnload
.
Is there a way to do that? I mean many other solutions propose to use onBeforeUnload
which Iām using but I need to differentiate between the deifferents events that trigger the onBeforeUnload
call.