搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Can not activate navigator.storage.persist in Firefox for Android

more options

Hello! I want to use persistant offline storage for my website. When I run following command in console: navigator.storage.persist.then(function(a) {console.log(a)}) in Desktop FireFox browser it prompts me for a permission and console.log prints "true". But when I run this command from Android version there is no permission prompt and the result is "false". Is there some condition I must to satisfy to switch storage to "persisted mode" on Android Firefox version?

Hello! I want to use persistant offline storage for my website. When I run following command in console: navigator.storage.persist.then(function(a) {console.log(a)}) in Desktop FireFox browser it prompts me for a permission and console.log prints "true". But when I run this command from Android version there is no permission prompt and the result is "false". Is there some condition I must to satisfy to switch storage to "persisted mode" on Android Firefox version?

被選擇的解決方法

That was a bug in Firefox for Android. Here is a related issue: https://github.com/mozilla-mobile/fenix/issues/14875 Now it is solved

從原來的回覆中察看解決方案 👍 0

所有回覆 (2)

more options

I found some information about this. According to "Can i use" on date 08 september 2020 (https://caniuse.com/mdn-api_storagemanager) Firefox 79 for Android don't support this feature by default. It must be enabled via internal configuration. So it's not possible to use this feature for a regular site nowadays. May be in future related bugs will be fixed and it will be enabled.

more options

選擇的解決方法

That was a bug in Firefox for Android. Here is a related issue: https://github.com/mozilla-mobile/fenix/issues/14875 Now it is solved