Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify that navigator.storage.persist() depends on heuristics #33780

Merged
merged 2 commits into from
May 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Next Next commit
Clarify that navigator.storage.persist() depends on heuristics
  • Loading branch information
tomayac committed May 27, 2024
commit 7f1dfe358567cdd6de1cb9298e4165db62b887a0
2 changes: 1 addition & 1 deletion files/en-us/web/api/storagemanager/persist/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ browser-compat: api.StorageManager.persist

{{securecontext_header}}{{APIRef("Storage")}}

The **`persist()`** method of the {{domxref("StorageManager")}} interface requests permission to use persistent storage, and returns a {{jsxref('Promise')}} that resolves to `true` if permission is granted and bucket mode is persistent, and `false` otherwise.
The **`persist()`** method of the {{domxref("StorageManager")}} interface requests permission to use persistent storage, and returns a {{jsxref('Promise')}} that resolves to `true` if permission is granted and bucket mode is persistent, and `false` otherwise. The browser may or may not honor the request, depending on browser-specific heuristics. (For Chrome, these [heuristics are documented](https://web.dev/articles/persistent-storage#chrome_and_other_chromium-based_browsers).)
tomayac marked this conversation as resolved.
Show resolved Hide resolved

> **Note:** This method is not available in [Web Workers](/en-US/docs/Web/API/Web_Workers_API), though the {{domxref("StorageManager")}} interface is.

Expand Down