Join us and the lead editor of IRL, Mozilla's multi-award-winning podcast, for a behind-the-scenes look at the pod and to contribute your ideas for the next season, themed: "AI and ME." Mark your calendar and join our Community Call on Wednesday, Aug 7, 17:00–17:45 UTC. See you there!

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Is there any close event of firefox browser ?

  • 1 பதிலளி
  • 1 இந்த பிரச்சனை உள்ளது
  • 3 views
  • Last reply by user293

I want to capture the event that fire when I close the browser.

Is there any way to capture event using JavaScript/JQuery?

Thanks

I want to capture the event that fire when I close the browser. Is there any way to capture event using JavaScript/JQuery? Thanks

ajeetyadav89 மூலமாக திருத்தப்பட்டது

All Replies (1)

I guess I'm kind of confused. Are you developing a webpage or a firefox add-on (although the jquery part makes me think you are making a webpage)?

There isn't any way to detect when the application quits, since all javascript stops running once the webpage is closed. However, you can detect when the webpage is about to be left, either from the application closing, the tab being closed, or the user going to a different page using the onbeforeunload event.

(also, this works in all browsers, not just firefox).