---
title: "Comment by Siddharth on \"Unsaved Changes Alert and Unsubmitted Data Preservation on Page Exit in React App\" | Hashnode"
description: "Excellent article Robiul, Thank you for sharing this. Will definately try these alternatives, one quick question - Do you this will also work with browser close"
url: "https://hashnode.com/posts/unsaved-changes-alert-and-unsubmitted-data-preservation-on-page-exit-in-react-app/6562a6ad87de4e0e3922d3e6/comment/65655136d27a730438f45d3d"
---

[Discussion](https://hashnode.com/posts/unsaved-changes-alert-and-unsubmitted-data-preservation-on-page-exit-in-react-app/6562a6ad87de4e0e3922d3e6)

Comment [Unsaved Changes Alert and Unsubmitted Data Preservation on Page Exit in React App](https://hashnode.com/posts/unsaved-changes-alert-and-unsubmitted-data-preservation-on-page-exit-in-react-app/6562a6ad87de4e0e3922d3e6)

[Siddharth](https://hashnode.com/@sidgujrathi)

[Nov 28, 2023](https://hashnode.com/posts/unsaved-changes-alert-and-unsubmitted-data-preservation-on-page-exit-in-react-app/6562a6ad87de4e0e3922d3e6/comment/65655136d27a730438f45d3d)

Excellent article Robiul, Thank you for sharing this. Will definately try these alternatives, one quick question - Do you this will also work with browser close? If not do you know a reliable way where we can do API call on browser close reliably?

[Robiul H.](https://hashnode.com/@robiulhr)

[Nov 28, 2023](https://hashnode.com/posts/unsaved-changes-alert-and-unsubmitted-data-preservation-on-page-exit-in-react-app/6562a6ad87de4e0e3922d3e6/comment/65655136d27a730438f45d3d#reply-65657acc4628c2732a755646)

Thanks for your good word [Siddharth](https://hashnode.com/@sidgujrathi). Regarding your question, yes, this will work for browser close in the same way. Also, it will work for all major browsers.
