Issue With Updating HTML5 Version To My Website



Took a long break, but have just returned to Defold.
When I upload new version of my HTML5 game to my website, the old version is shown?
If I clear browser cache and reload the game then the new version is shown?
Any way to fix the above, I can’t keep telling players to delete their browser cache…

Here is the HTML5 game demo:




Feature Request: MD5 Cache.


This is a consistent issue with all the HTML5 game engines I have used.
I contacted my hosting provider and explained the issue to them.
Perhaps they can modify the site’s cache settings or something…





My hosting provider says they have no control over browser caching.
Hope the Defold devs can fix this on their side soon.



Did you fully delete the older files you uploaded previously?

If so the problem isn’t Defold it’s your browser cache. This is NOT something Defold can solve for you.

If you want to guarantee a new download then you need to change the links to the files (easy way to do this is to add a version number at the end like ?v=1.1) or change the TTL of your Apache file server (which you use according to your site’s headers). I looked at headers of some of your files and it looks to be 3 days long currently.


No, don’t touch the server config.
What We need is a MD5 Cache.
Look at this:


That seems fine to do. For people who don’t click the link, what Defold could do is add hashes to the filename of generated files which impact loading of other files and caching.

So instead of game.arci0 it could be game-d58e3582af.arci0 and it could be done by the bundler.

Possibly it could be possible for a user to create a tool which could scan bundled HTMl5 versions and rename files to include the hashes / edit the related files to point to the proper versions.

I didn’t know some browsers don’t cache links with like ?v=1.1 I think it’s only depreciated versions of Firefox? So not an issue in 2018?

@cocosgames you should make an official feature request on the github for this.


I think you can add


everywhere in index.html where you have file paths. It should work, but I’m not sure that it works with internal Defold web server




Isn’t this what Archive Location Suffix is used for? To force a cache update?

Perhaps I misunderstood the feature and now wonder what it’s good for.


This is for adding ?v=1.1 style of thing. Hash based filenames would be a little different. The benefit of hash based filenames would be if a certain file is not modified between builds it doesn’t get redownloaded again.



Does the “index.html” file change with each build?
I really need a solution to this problem.
I’ll try the above for now, but the Defold devs really need to address this on their side.