How do I force construct 2 to load no-cache version..

Get help using Construct 2

Post » Sun Nov 13, 2016 1:24 am

So I publish a project to web server...
update it, republish it... is there a way I can force the browser to load an uncached version? to save having to wait for browsers to recache it (when it feels like it!)

Thanks in advance, L :?:
B
38
S
8
G
5
Posts: 141
Reputation: 4,610

Post » Sun Nov 13, 2016 5:18 pm

In most browser debuggers there is an option to force the browser to not cache content.
Like in Chrome:
http://stackoverflow.com/questions/5690 ... evelopment
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"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,414
Reputation: 4,822

Post » Sun Nov 13, 2016 7:45 pm

Thank you. Yeah I have mine set so I can turn on debugger and reset cache is enabled...

.... but not for regular 'users' they get served the cached version, sometimes for what seems an age. would be cool if I could tell the browser that the version has been updated and it loads the new version accordingly instead of the cached version..
B
38
S
8
G
5
Posts: 141
Reputation: 4,610

Post » Mon Nov 14, 2016 10:06 am

I think this would be a good approach

http://stackoverflow.com/questions/3244 ... er-caching

I was working on a game which released a new version every week for 3 years (sometimes more, everyody loves hotfixing!) via unity webplayer. We solved the problem by appending a random junk string to the ask.
B
8
S
2
Posts: 32
Reputation: 620

Post » Mon Nov 14, 2016 3:22 pm

@damousey thank you! this sounds like it is exactly what I require. will update how I get on... I wouldn't even mind having to manually edit the html file each time....

*thinking* about this though; this could surely be an 'option' in construct 2 when exporting? @ashley or @tom?

Ideally, you'd want construct 2 / (or 3 even) to handle version number increases with major versions perhaps resetting the cache automatically as per above?
B
38
S
8
G
5
Posts: 141
Reputation: 4,610

Post » Mon Nov 14, 2016 5:20 pm

For regular users, there should be a cache-control header that you can modify on the webserver.
https://stackoverflow.com/questions/448 ... he-control

If my understanding is correct, cache-control header works for proxies and end-user caches, but if not, you can always have versioned URLs:
http://metaskills.net/2006/02/19/how-to ... -apache-2/
http://stackoverflow.com/questions/1207 ... -a-webpage

You can use REST to do this too. Something like:
protocol://domain/appname/v11
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"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,414
Reputation: 4,822


Return to How do I....?

Who is online

Users browsing this forum: mrkaio, Zav and 2 guests