1

I have an handler for window.onbeforeunload. This is getting called when I am making a call to download a file using window.location(). Can you please help in solving this? the handler should get called when the page refresh is done or URL is changed but not on file download.

Seeker
  • 2,405
  • 5
  • 46
  • 80

1 Answers1

1

See here.

If you download your file inside an IFrame, onbeforeunload will not be fired.

Community
  • 1
  • 1
Ygalbel
  • 5,214
  • 1
  • 24
  • 32