How can I simply test if the data for a web app will warn the user before being deleted by the browser?

梦想与她 提交于 2019-12-13 02:56:23

问题


This is a follow-up question from How do I make the data of a web app "persistent" as opposed to "best-effort"? I want to avoid the data being cleared when there is not enough space.

According to https://developer.mozilla.org/en-US/docs/Web/API/Storage_API:

"If a box is marked as "persistent", the contents won't be cleared by the user agent without either the data's origin itself or the user specifically doing so. This includes scenarios such as the user selecting a "Clear Caches" or "Clear Recent History" option. The user will be asked specifically for permission to remove persistent site storage units."

I guess I could try to add so much data until the DB is full but is there a simpler way to trigger this? It would be great for peace of mind.

来源:https://stackoverflow.com/questions/51808863/how-can-i-simply-test-if-the-data-for-a-web-app-will-warn-the-user-before-being

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!