Safari History Delete ISSUE

My Safari Web Extension uses a service worker and an IndexedDB database (IDB).

For what hidden reason or perverse logic when deleting the Safari history all service workers are brutally shutted down and the database emptied of all its contents? And I heard about local storage too...

It happens all the time in Safari macOS and iOS. Safari is the only browser in the world that takes the liberty of deleting what it shouldn't. Good Job indeed.

I am well aware that Safari deletes an IDB database after 7 days of inactivity, but this is not the case I am referring to.

I am using Safari with the web extension installed and running that interacts with the database.

While browsing, I decide to delete Safari's history manually, and what happens?

What happens is that not only the history is deleted, but also everything else (database, local storage,.... and the service worker is brutally taken down).

But I had only asked to delete the history... BAH.

Anyway, I found the solution. And it works on both macOS and iOS, in spite of Safari's nonsense.

Thanks for all the countless (= 0) suggestions/information received regarding my problem.

Safari History Delete ISSUE
 
 
Q