How to avoid black screen after every update?

0 favourites
  • 3 posts
From the Asset Store
Fantasy Game includes more than 600 sound effects inspired by hit computer games like World of Warcraft and Diablo.
  • I get complaints from my players, and sometimes I see it myself too - a black screen after the game is updated, it happens mostly on iOS, but less often on other devices.

    The problem can only be solved via 'Clear Site Data' in browser console then Ctrl+F5 with enabled 'Developer Mode' on the phone, while connected with USB cable to the desktop computer, what is almost impossible for an average player with iPhone or Android.

    Offline Mode is disabled in the project (as not needed);

    Nginx cache is disabled - Server headers:

    cache-control: no-cache cache-control: no-store, no-cache, must-revalidate, proxy-revalidate

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Make sure the server is configured to use the same cache settings for all file types - if your server is doing something like caching HTML files for 7 days but JS files for 1 day, then after an update you could end up with browsers loading a mix of files from different versions, which will then break.

    Your Cache-Control header looks strangely formatted - it should be enough to set Cache-control: no-store, but that won't fix existing browsers with a bad cache.

    You may actually find it works better with offline support enabled - Construct then manages updates by ensuring the new version is fully downloaded bypassing the cache, and then swaps over to that on the next reload. Another strategy is to use different URLs for every update to make sure it never mixes up versions (e.g. mygame/v1/index.html, mygame/v2/index.html...), which you can then enable immutable caching for as versions never change.

  • Make sure the server is configured to use the same cache...

    Done

    You may actually find it works better with offline support enabled...

    Yeah, I already tried it, and there were some problems there too, but I don't remember which ones ))

    Another strategy is to use different URLs...

    Good idea! Will try that.

    Thank you!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)