I am trying to make my firebase app work offline. In the documentation, it talks of disk persistent in android using
Firebase.getDefaultConfig().setPersistenceEnabled(true);
I was wndering if there is anyway to get such a feature for a web app so I can cache my firebase database and my site to still function even when offline.
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSycccccceeeeeeeeeeeeeeeeeee",
authDomain: "gotube-ccccc.firebaseapp.com",
databaseURL: "https://gotube-ccccc.firebaseio.com",
storageBucket: "gotube-cccc.appspot.com",
};
firebase.initializeApp(config);
firebase.getDefaultConfig().setPersistenceEnabled(true);
</script>