G
G
Guverner2016-05-04 13:51:27
Browsers
Guverner, 2016-05-04 13:51:27

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:

  1. The player has downloaded the game
  2. We have changed the files on the server
  3. Player logs in within an hour
  4. The player is loading the old version of the game from the cache

Is there any way to force a new version to be downloaded when it is updated on the server?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vjacheslav Kanivetc, 2016-05-05
@Guverner

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 question

Ask a Question

731 491 924 answers to any question