Home › Forums › Programming › Caching of verge3d app files
- This topic has 14 replies, 4 voices, and was last updated 1 day, 9 hours ago by justin_blender.
-
AuthorPosts
-
2020-09-10 at 4:57 pm #32704chrisiwienCustomer
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.
2020-09-11 at 4:13 am #32711Yuri KovelenovStaffHi,
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
2020-09-11 at 1:41 pm #32772chrisiwienCustomerHey 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
2020-09-12 at 5:50 am #32783Yuri KovelenovStaffHi 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).
2020-09-12 at 6:00 am #32784chrisiwienCustomerOk, 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.
2020-09-12 at 6:26 am #32786Yuri KovelenovStaffYep, 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.
2024-12-13 at 9:28 pm #79387justin_blenderCustomerHello!
I hope this old thread gets recognizedI 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
2024-12-14 at 8:55 am #79390kdvParticipantBut 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.
2024-12-14 at 9:54 am #79393justin_blenderCustomerI 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?2024-12-14 at 10:21 am #79396kdvParticipantActually 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.
2024-12-15 at 7:47 pm #79407justin_blenderCustomerSo 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.2024-12-18 at 8:04 pm #79462justin_blenderCustomerIn 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
2024-12-19 at 5:05 am #79466Yuri KovelenovStaffHi 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.
2024-12-21 at 7:43 pm #79503justin_blenderCustomerThanks Yuri!
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.2024-12-22 at 6:13 pm #79510justin_blenderCustomerAfter 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. -
AuthorPosts
- You must be logged in to reply to this topic.