0

// This might seem to be a duplicate question, but all the questions I have found were old and was wondering if there is any new functionality available in the latest browsers

Requirement: Identify if the user has refreshed or reloaded the page on the event "beforeunload" or "unload".

tony
  • 41
  • 3
  • 1
    Why would you need this? I mean, if the user is leaving for a site out of your control, there's not much you can do... – AKX Apr 14 '22 at 08:19
  • I've found this answer that seems to answer what you are after https://stackoverflow.com/questions/5004978/check-if-page-gets-reloaded-or-refreshed-in-javascript – Charlie Araya Apr 14 '22 at 08:26
  • The answer in the link is 11 years old. i had gone through that answer. I thought after so long the latest browsers might have some thing that can directly say if it was a reload or leave – tony Apr 15 '22 at 15:00

0 Answers0