0

I am running a multiplayer game based on SWFs. These cache to the browser as you know. When the game gets updated, users are FORCED to clear their cache. There's a fix for this, which is adding a random time. As the game uses over 10k SWF files, how can I make this auto? As an SWF file is requested, automatically add to the end of the url as so: file.swf?nocache=somethingrandom

I am capable of PHP, Nginx and any related Centos 6(6.9) solutions.

  • How are the files requested? If you can append PHP to the url stick "?q=" . rand() on the end of it. – MCMXCII Sep 07 '17 at 16:42
  • A browser will keep the files cached as long as your server instructed them to cache. You must use headers from your server to control the cache. See https://stackoverflow.com/questions/18148884/difference-between-no-cache-and-must-revalidate. Also if you generate the page from server which puts SWF urls then you can use build id or something which each changed the page refresh to get the latest files – Tarun Lalwani Sep 07 '17 at 17:14

0 Answers0