Guys i got some problem

i want to use “BABYLON.Database.IDBStorageEnabled = true” to cache my models texture.The first image is the indexedDBs data,and the second image is the next time upload data,they are different,the data of blobs url is random,so i can not use caches data,who can tell me why?thanks


What you see here are images loading from Blob url objects, so it is all coming from local data which might in fact be coming from your local storage.

This is how babylon converts images retrieved from the cache:

transaction.oncomplete = () => {
                var blobTextureURL: string;
                if (texture) {
                    var URL = window.URL || window.webkitURL;
                    blobTextureURL = URL.createObjectURL(;
                    image.onerror = () => {
                        Logger.Error("Error loading image from blob URL: " + blobTextureURL + " switching back to web url: " + url);
                        image.src = url;
                    image.src = blobTextureURL;
                } else {

so it sounds all good ?

1 Like

i do a test,The first time,i load the model and cache it in indexedDB,then,idelete the image in server. i access the webPage again,it show the error, what’s wrong with me?

@RaananW in case you have a bit of spare time ?

Sorry, just had some time going over this - are you referring to the cached blobs? as you already figured out - blobs are randomly generated and can’t be cached. they are generated using your gltf data you prodive. The glTF itself can be cached which will prevent this from happening. Could you recreate that in the playground so I will know we are talking about the same thing? You can explain how I can simulate this behavior (I hope you can, under the limitations of the playground).

Also note - blobs are no longer cached (a change that was pushed a week ago), because it makes no real sense.

Also, can you make sure you are disabling the manifest check?

engine.disableManifestCheck = true