Vijay Kumar Posted April 4, 2016 Share Posted April 4, 2016 Hi, every time i make some update in babylon file and i want to check it in browser , the browser is taking the already downloaded or existing file from cache. this way i am getting the old babylon file not the updated file. please help me how to avoid taking the old babylon file from cache. can we make it through javascript . every time the browser has to take the updated texture and babylon file . Quote Link to comment Share on other sites More sharing options...
OMAR Posted April 4, 2016 Share Posted April 4, 2016 Hello, Babylon uses JSON formatted manifest file to track changes made in the server files to use it while storing information in the local database. What this means is that, if you have made some changes to the assets you have to update the manifest file too by changing the version value, doing so will force Babylon to re-download assets. There is another way as well, just set engine.enableOfflineSupport to false to make Babylon re-download assets every time it is loaded. Cleaning browser cache can also really help while developing your game if you make frequent changes to your assets in the development process. Take care! Pryme8 1 Quote Link to comment Share on other sites More sharing options...
RaananW Posted April 4, 2016 Share Posted April 4, 2016 or simply add a timestamp parameter each time you call the .babylon file. so the file will be called "file.babylon?TIMESTAMP" where TIMESTAMP is the value of Date.now() (for example). This will disable cache. Pryme8 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 4, 2016 Share Posted April 4, 2016 you can manually turn off the cache with BABYLON.Database.IDBStorageEnabled = false Vijay Kumar and babaorhum 2 Quote Link to comment Share on other sites More sharing options...
Vijay Kumar Posted April 6, 2016 Author Share Posted April 6, 2016 thanks everyone, HI OMAR, i used engine.enableOfflineSupport method but still the browser is taking files from cache. i will check with the option given by Deltakosh. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.