[Solved] Problems with game updates

Get help using Construct 2

Post » Wed Sep 14, 2016 11:18 am

Hi,
I have read https://www.scirra.com/tutorials/70/off ... onstruct-2 but I have still some poblems.
When an update is ready I show a text to say the user to reload the page.
When, after uploading new files, I open the site I get these requests on apache:

Code: Select all
"GET /offline.appcache HTTP/1.1"
"GET /index.html HTTP/1.1"
"GET /offline.appcache HTTP/1.1"

After this the text to reload the page is showed. Until here is all working.

Now this happens:
I hit reload and on apache I can see that only images files and offline.appcache file are requested.
No js or html files are requested to the server but is still loaded from the cache.
So the game is not updated (maybe images are, but I did not change those so I can't know).

Can somebody help?
Thank you!!!
Last edited by Ciao121 on Sun Sep 18, 2016 8:48 am, edited 2 times in total.
B
12
S
5
Posts: 42
Reputation: 990

Post » Wed Sep 14, 2016 8:29 pm

Make sure that your offline.appcache is getting updated with your client.

Also make sure that you have browser caching disabled (in the settings or you can temporarily disable it in most debuggers -- like Firebug). I use like four different browsers one of which has all caching completely disabled.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Post » Fri Sep 16, 2016 9:12 am

Hi gumshoe2029,
Thank you for your answer.
I'm sure offline.appcache is updated (and in fact the text to reload the page is showed). In offline.cache there is also a list of all files needed to be refreshed (I think) including js files.

If I clear my browser cache I have no problem. But I need to make it work for everyone. I can't ask users to manually clear their cache or to disable browser caching.
B
12
S
5
Posts: 42
Reputation: 990

Post » Fri Sep 16, 2016 9:29 am

You use the Browser object to update, it's all mentioned here in the 'Updating your game' section :
https://www.scirra.com/tutorials/70/off ... onstruct-2
B
46
S
16
G
78
Posts: 2,166
Reputation: 46,349

Post » Fri Sep 16, 2016 1:42 pm

plinkie,
that's what I was doing. For some strange reason (maybe a particular browser setting) it was not fully working.
Since I cleared browser cache one time it started working like a charm.
Thanks and sorry for bothering!
B
12
S
5
Posts: 42
Reputation: 990

Post » Tue Sep 20, 2016 4:11 am

Another possible solution:
http://stackoverflow.com/questions/1922 ... lear-cache

Adding version numbers to all of your CSS/JS files seems to be the best way to ensure that the clients have the latest version.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830


Return to How do I....?

Who is online

Users browsing this forum: beohs, brunopalermo and 13 guests