How do I trigger "On update ready" & "On update found"?

Get help using Construct 2

Post » Sat Jun 17, 2017 12:55 am

Seriously, I'm struggling with this for a while now and i can't get it to working. Those triggers were working before they were removed and reimplemented.

Is there something i am missing? I know how to implement them. I wondered if there was probably sth wrong with my webspace server settings about the appcache file?
B
11
S
2
Posts: 9
Reputation: 812

Post » Mon Jun 19, 2017 7:19 pm

You can just use the appcache file to control the "max-age" of all of your web content directly. If you have dynamic access to the HTTP headers you can dynamically set these. I use Apache's mod_headers to do it for me.
See: http://metaskills.net/2006/02/19/how-to ... -apache-2/

Alternatively, you can include a "version" tag in your javascript or html that if it doesnt match the current version you can trigger an update manually in C2.
Or you can do a URI-based version control system, like:
www.example.com/game/client/v1.49.4556
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
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Mon Jul 10, 2017 11:00 pm

Thanks for the advises.

How do you trigger an update manually?
B
11
S
2
Posts: 9
Reputation: 812

Post » Fri Jul 14, 2017 6:25 pm

You set the content max-age to less than now, and it will cause the client to re-download anything with max-age < now.

For example, I have my Apache set to vary the max-age header by content type:
Code: Select all
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/html "access plus 1 seconds"
  ExpiresByType image/gif "access plus 259200 minutes"
  ExpiresByType image/jpeg "access plus 259200 minutes"
  ExpiresByType image/png "access plus 259200 minutes"
  ExpiresByType text/css "access plus 60 minutes"
  ExpiresByType text/javascript "access plus 60 minutes"
  ExpiresByType application/x-javascript "access plus 60 minutes"
  ExpiresByType text/xml "access plus 60 minutes"
  ExpiresByType application/json "access plus 1 seconds"
</IfModule>


This way, it updates the c2runtime.js every hour, while image files it only refreshes every 6 months.
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
23
S
6
G
1
Posts: 1,419
Reputation: 4,857


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests