Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Project refreshing problem?

Jason

Awesome Bro

Is anyone else having the following problem?:

Basically, I export the game so it's a .html file (Along with other things...), and it's definitely a new build of the demo since I've tried it multiple times now... and when I come to test out the .html file, it's basically making me play an older build of the demo, so I can't see the cool new things I've just added through a public link, it's making it really hard now to share updates with people on the forums, since I'm clearly uploading the correct build, but when I link it to people, it's giving them an older build...

Does anyone know how to fix this or anything, it's REALLY annoying!
 
It's very annoying. Basically you have to clear your browser cache.

I don't know how to only remove a particularly cache in chrome without removing my entire day worth of cache =/
 
Only solution is to name the thing something else so their browsers load it entirely from scratch, without relying on cache.

There are other solutions you can use, but they will be a much larger pain in the ass and involve your editing the html code on every export. You can "trick" browsers with javascript to force reloads based on random query strings ... but unless you know what you're doing, this may cause a lot more of a headache than you're willing to endure.
You could attempt a no-cache meta tag which may cause the user's browser not to cache, but that will affect your game as it will force reloads every 300ms or so.

Honestly I'd just go with a rename.
 
OR, tell people with Firefox and Chrome to do [Ctrl]+[F5] on loading.
Yeah I think that should probably work too.
That will force a non-cache reload.

Test it but that might be the easiest method.
 
Hi jbrist, not sure if it still works, but try:

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">

(Inside <head></head>)

This should tell the browser not to cache the page.

Obviously, it doesn't work with Internet Explorer older versions, because that would be too simple. :kiss:
 
That should work, but I don't know if Construct 2 games rely on cache. Wouldn't work if you used cookie-based savegames or things of that nature, would it?
(Couldn't hurt to test anyway :kiss: )

Also it doesn't matter if it doesn't work in NS or <IE9, as C2 games are HTML5 and wouldn't play in those browsers at all anyway :)
 
Including the file via PHP should do the job (with renaming, of course). Wyatt's method would be the best, but as Ven said, no idea if it works.
Worst case, use an iframe for the inclusion... still better than a client-side solution...
 
Wyatt":oh5bs7fc said:
Hi jbrist, not sure if it still works, but try:

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">

(Inside <head></head>)

This should tell the browser not to cache the page.

Obviously, it doesn't work with Internet Explorer older versions, because that would be too simple. :kiss:
That works as well


or


if you make another directory in FTP like version1 folder, version2 folder, etc. If you use this kind of version control.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top