Jas
Jas

Reputation: 308

Is it possible to delete LocalStorage while application is closed?

Is it possible to delete a specific key within an application's LocalStorage without opening the app itself?

I was thinking of creating a batch file script for deleting a certain key within the app's LocalStorage while the application is still closed. The problem is accessing the application's LocalStorage outside of the app. So far, a NodeJS script seems plausible.

The application is a Vue app encapsulated in an Electron instance.

Any insight would be appreciated!

Upvotes: 0

Views: 436

Answers (1)

Nishant S Vispute
Nishant S Vispute

Reputation: 775

Yes you can do it on your app.vue using beforeUnmount hook

Here is a link to the VueJs lifeCycle hook List Link in there you can find 2 hooks that you can possibly use beforeUnmount & unmounted

However as such kind of clean up activities are done in beforeUnmount and server-level such crash reports and other log activities are done unmounted

Upvotes: 1

Related Questions