Script to remove history from chrome and firefox excluding logins

Hello,

This code works very well. code

But there are two critical points for me, first of all, the staff working in our institution save them as bookmarks because they visit too many websites. When I run this script, it clears bookmarks completely. Can you edit this so it doesn’t clear it?

Another point I have observed is that if google chrome is open, it does not delete the browser’s history. If google chrome is closed then it clears it completely. You are requested to clear the history while the browser is open, if possible. If this is not possible, close the running browsers (chrome.exe, firefox.exe, brave.exe , etc) before this code runs and then run the relevant script code.

I wish you good work
Best regards

Hi @hguler07,

We have asked our script developers to implement the changes you have requested and the updated script will be shared here.

Kind Regards,
PremJK

Hi @hguler07,

Our script developers analyzed your request but unfortunately in firefox, both history and bookmarks are stored in the same database. so it can’t be achieved.

We can save the login and bookmarks for chrome and also possible to close the chrome browser forcefully.

Please let us know if it is okay for you.

Kind Regards,
PremJK

Hello,

For Firefox, this is a bit of a technical issue and I guess there isn’t much we can do, they generally use chrome in our institution, so it might be enough to operate on chrome.

The reason why I want this in other browsers is to not miss anything. Rarely, those who use firefox or brave, but no problem, 90% use chrome and I would be very grateful if you could share a script for it.

Two important points are:

  • The saved password (login data) should not be deleted.
    *Websites registered to bookmarks should not be deleted.

Normally, when we say CTRL + H delete history, we can delete the history without closing the browser.

I can’t predict how this works as a script. It would be great if a user can clear their history when I send this script file while their browser is open. This is my first choice

However, if this code doesn’t work when the browser is open, and the browser needs to be closed for the code to work, it is convenient for me to close the browser and delete the history.

I wish you good work.
Best regards,

Hi @hguler07,

Thanks for your prompt reply.

Kind Regards,
PremJK

Hi @hguler07,

Please run this script prepared by our script developers and provide your feedback
https://scripts.itarian.com/frontend/web/topic/deleting-chrome-browser-cache-except-bookmarks-and-logins

Kind Regards,
PremJK

Hello,

This code works exactly as I want it. Thank you so much.

Best regards.