Answer the question
In order to leave comments, you need to log in
How does the game update mechanism work in Odnoklassniki? How to refresh browser cache?
Two questions.
A) There is a released game that is displayed in the list of other games.
All the necessary files for it are on our server and the URL from the page with the game is specified in the application settings.
Do I need to do anything extra to update, other than update the files on our server?
Perhaps Odnoklassniki keeps our old version of the game indefinitely on the site or something like that?
Are the icons for the application saved or do they change instantly?
B) The game is being developed by Unity webgl. The problem is updating the browser cache.
Problem step by step:
Answer the question
In order to leave comments, you need to log in
a) The icons specified in the application settings are cached on the cache servers, and in order to be guaranteed to change them, the url to the original icon in the settings must change.
b) There are various solutions to ensure that changed files are updated.
The easiest option is to add a random parameter like yoururl/resource.js?rnd=Math.random() to all resources.
The option is a little more complicated, we save traffic:
1. When you make a build, sew its number into the application
2. The application requests yoururl/ resources at startup buildno/resource
3. On the server, make a rewrite rule that uses yoururl/buildno files from the new build (well, or just a symlink to a common place where you always have the latest versions)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question