We have heard from a few developers about issues with updating HMTL5 games; specifically, developers not seeing the new versions of files after the normal amount of time (about 15 minutes) it takes for the server cache to clear. Here is a tip to help prevent this problem: When uploading a zip archive of additional files for your HTML5 game, make sure you are compressing sets of loose files rather than a folder or directory. When a zipped folder of files is uploaded to our server and unzipped, a subdirectory is created for the folder's contents, changing the relative paths of those files. For instance, instead of seeing a file at `kongregate.com/gamez/1234/5678/live/example.txt` uploading a new version in a zipped folder named New\_Game\_File\_Folder0001 would give it the filepath `kongregate.com/gamez/1234/5678/live/New_Game_File_Folder0001/example.txt` This can result in game files not appearing to be updated unless the filepaths in the game itself were changed. To avoid having to do this every time a game is updated, and to avoid versioning problems in general, zip archives of loose files so that new versions will replace older ones in the proper locations in your game directory.
This solved my problem. Thank you. I don't know what they are doing but if I'm testing something on their upload system and then make it live… **it** **should** **use** **the** **files** **from** **the** **test** **system.** Wasted a lot of time trying to figure out what is going on.
ceptri: Subdirectories are okay, as long as those folders are loose within your game files. Your game files seem to be in the right place. When did you last try uploading?
I've got the same problem. So if I understand, I've got 2 ways to update my HTML5 games : - change the path for each version - keep the same path (with loose files, or with zyplogames folder organisation) and wait 15mn to test the new version. In both case, it's not easy to figure it out by ourself… Will this be improved?
This is what I'm doing. I have the main project folder where the html file is, all files are loaded relative to this location. I ctrl+a and select everything, I deselect the html and add to a zip archive. After uploading I try to play, no update (which is odd seeing that I set my game engine to specifically deny caching of files for the development run, perhaps kongregate overrides this or chrome ignores it (works fine on my test server though so I find it unlikely chrome ignores it), after 30 minutes there's still no update. 2 hrs, still no update, 12 hours no update, 24 no update, 48 hours later and the files are finally being used. Quite annoying as by then I will have made new iterations that I can't upload because I need to make sure my changes work on kong and not only my local test server.
Agree – this is pretty rough. Even a simple ftp interface would be a massive improvement here.
I had the same problem with my new game Plexr ( [http://www.kongregate.com/games/kitoba/plexr-2-0](http://www.kongregate.com/games/kitoba/plexr-2-0) ) —I imagine it's probably caused by some server setting that is doing some additional caching of "static" assets, i.e. js and css. Here's what worked for me: The index.html page seems to update immediately. The only files I was changing were my main js and css files, so I renamed those with timestamps, and edited the index file to point to the current versions. After that, I started seeing my changes immediately.
Sorry to dig up an old post, but I have the same problems as mentioned above. I am indeed zipping sets of loose files, but the game is not up to date. Updates may take between 10 and 30 hours before showing up. Still weirder, some players were displayed different version of the game when refreshing the page. I tried everything I might have seen, like using loose files, changing files names, etc, nothing works as expected. Updates still take tens of hours, or days, to show themselves after uploading the files.
Thank you so much for these very precise procedure ! I did as you explained, changing these 3 files' version, and editing their reference name in the index.html, but this does not seem to work for me: after upload on preview, the result depends on the browser I used. First one, old files were still showing, and on second browser (maybe because the cache was cleared), game preloader got stuck as if some file was missing. I waited 15 minutes to make sure that the new archive with the edited name files was cached, but when refreshing preview page, the results were the same. Thank for your time, anyway !
**bump** Have tried several methods. Both loose zip and re-naming to version number with mixed/inconsistent results. Please fix!
Yeah, this is a huge issue, especially for UNITY exports, where renaming files and changing their loading scripts to point to versioned files is a bit of a pain. Please get this fixed.
We fixed this for our game (Idle Raiders) by writing a custom renamer that takes all files in our projects, renames all of them (adding some kind of suffix, like "gamea02f.min.js" and updates all references within those files to the new names. Has been working like a charm, all files instantly updated upon upload, etc.
It would make it easier if there was a way to delete the existing additional files uploaded to the preview. The selective updating it does is just unreliable for miniscule code changes.
It always works very well in the preview version, but when I release it, the graphics are messed up and nothing works. I tried using a differen directory, and I waited long enough, I have been trying to update for a few days now, even the live version is broken by now, because it worked great on the preview. WHEN IS FTP COMING?!?!
We got an email from Kong dev support a couple of months ago which said the issue was fixed finally. Unfortunately, in our experience it didn't change anything.