Skip to content

Commit c13ed73

Browse files
authored
Merge pull request #9808 from doing-art/off/770-documentation-for-persistent-opfs
Documented how to enhance persistent mode in the browser file storage (OPFS)
2 parents c66cf83 + 0734e1f commit c13ed73

File tree

1 file changed

+13
-0
lines changed
  • content/en/docs/refguide/mobile/building-efficient-mobile-apps/offlinefirst-data

1 file changed

+13
-0
lines changed

content/en/docs/refguide/mobile/building-efficient-mobile-apps/offlinefirst-data/best-practices.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,16 @@ Datagrids can not have columns with attributes from related entities in offline
139139
### Attribute Paths in Sort Orders
140140

141141
Attribute paths can not be used in sort orderings in offline apps.
142+
143+
## Enhancing Persistent Mode in File Storage {#persistent-mode}
144+
145+
When using offline profiles, files are stored locally on a user's device in the browser Origin Private File System (OPFS). The OPFS can operate in two modes: **persistent** and **best-effort**. The **persistent** mode is preferable because it offers greater storage capacity and better data durability. While **persistent** mode is used by default, a browser may opt for **best-effort** mode if it assesses the site's importance as low. This assessment is made based on internal browser heuristics, which include the following:
146+
* The level of site engagement
147+
* Whether the site has been bookmarked
148+
* Whether permission for site notifications has been granted
149+
150+
To enhance the likelihood of operating the OPFS in 'persistent' mode, consider taking the following actions:
151+
* Bookmark the site
152+
* Enable notifications for the site
153+
154+
Firefox does not utilize heuristics but instead displays a popup requesting permission to use **persistent** mode. To proceed, simply click **Allow** in the popup.

0 commit comments

Comments
 (0)