We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Caching of verge3d app files

Home Forums Programming Caching of verge3d app files

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #32704
    chrisiwien
    Customer

    I’ve integrated a verge3d app with the WordPress-Plugin. Everything works fine, but I have a question about caching.

    Every time a user revisits the page with the verge3d app all the app content is downloaded again. I guess image data (JPG, PNG) will be cached via the standard settings.

    Does it make sense also for .blend files to define a mime type/caching type in the server settings? So the .blend files are also stored in the browser cache?

    The blend file of my verge3D has now the size of 10 MB. Would be nice if caching of this large file is possible.

    Thank you in advance for your replies.

    #32711

    Hi,

    Verge3D loads exported files .gltf/.bin, rather than .blend files. The former can be further compressed for more performance gains.

    https://www.soft8soft.com/docs/manual/en/introduction/Asset-compression.html

    Chief 3D Verger | LinkedIn | Twitter

    #32772
    chrisiwien
    Customer

    Hey Yuri!

    Thx for your answer. Ah, ok, I’ve discovered via browser network inspector that the scene files are all in the browser cache.

    The point ist: On each page visit the app loads every time completely new.

    Is there any way to store also the scene in the browser cache or is it necessary to create the 3D scene every time a user visits the page?

    I guess no, this isn’t yet implemented in browser technologies, right?

    Regards

    Christoph

    #32783

    Hi Christoph,

    Browser cache stores all files locally, on the computer of the user. So it is necessary to run the application at least once in order for the files to get cached.

    If a new scene is loaded each time the user visits your website, then there will be no gains from cache. However, it might be still possible to isolate elements, that are common for all scenes, in one scene that will always be loaded and as such cached (e.g.: some background model that is used everywhere).

    Chief 3D Verger | LinkedIn | Twitter

    #32784
    chrisiwien
    Customer

    Ok, thanks for your answer. I was just wondering why every time the preloader appears. All elements of the app are stored in the cache as you said. So the preloader shows the time for setup of the 3D scene. Ok.

    #32786

    Yep, besides the 3D scene files, there are other files that constitute the 3D web application – HTML, CSS, JavaScript, icons etc, and processing them requires time even if they are cached. The application also needs time to process the 3D scene files in order to recreate the scene graph in memory.

    Chief 3D Verger | LinkedIn | Twitter

    #79387
    justin_blender
    Customer

    Hello!
    I hope this old thread gets recognized :bye:

    I had experienced numerous times that the scene did not refresh in the application after it was updated. For updated html / js files the solution is simply to clear the cache. This apparently also clears the cache for scene related files like .gltf & bin. But the problem remains that the scene (or at least parts of it, i cant tell for sure) does not refresh. Opening the app in incognito mode then reveals the updated scene. I am not able to reliably reproduce this problem which makes is extremely hard to trace.

    This only happens on webservers, not local

    #79390
    kdv
    Participant

    But the problem remains that the scene (or at least parts of it, i cant tell for sure) does not refresh

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #79393
    justin_blender
    Customer

    I never knew this setting.
    Actually i am using my own host, not the v3d network.
    But could it be the setting “skip files modified more than 8 hours ago” then?

    #79396
    kdv
    Participant

    Actually i am using my own host, not the v3d network.

    then it depends on your host’s cache settings…

    But could it be the setting “skip files modified more than 8 hours ago” then?

    no. that option is for uploading only. it allows to ignores old unchanged files when re-uploading.

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #79407
    justin_blender
    Customer

    So I did some research which Apache settings could be solving this.

    But as I don’t want this to happen randomly for customers, I’d like to validate the solution by first re-creating the problem.
    So far I was not able to. Does anybody have an idea which scenario could be prone to causing this issue? I tried a relatively large model scene and small scene.

    #79462
    justin_blender
    Customer

    In fact the updated scenes always reflect correctly in incognito mode. So this cannot be a server side problem.

    My customers repeatedly have this issue which is becoming a real problem here. Today again. Only incognito works for them. But this cannot be the solution

    #79466

    Hi justin_blender,

    It looks like a browser cache issue. In incognito mode, the browser does not use cache.
    A possible workaround can be to disable caching in Apache settings so that the browser always loads everything anew.

    Also check if PWA / offline mode is enabled for your app.

    Chief 3D Verger | LinkedIn | Twitter

    #79503
    justin_blender
    Customer

    Thanks Yuri! :good:
    The good news is, I have a scene where the problem came up so I could try this.
    The bad news: None of this works unfortunately.
    I will contact my host service next.

    #79510
    justin_blender
    Customer

    After checking the network tab, I saw that most of the files are being cached, even after clearing the browser cache. That was to be expected.
    But the probably most important file causing the scene to load weird stuff is the *.bin file.
    I versioned it inside the gltf file like .bin?v=2″} and now the scene loads properly. There are probably ways to automate the versioning, but I’ll try that in the next iteration when the problem arises again.

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.