Problem with Chrome and offline.js file

0 favourites
  • 1 posts
From the Asset Store
Convert multiple Excel files into JSON files and import them into construct3.
  • I have a game that has a lot of audio files and it takes about five seconds to load. On Chrome (and now Edge Beta, which uses the Chrome engine) the game loads fine the first time. The second time all you get is a black screen (sometimes after about a full minute it will load), and then if I go to a new tab and try to load the website that has the game, the website itself (not the game) takes an extremely long time to load. On regular Edge and Safari there's no problem.

    Using f12 I saw that it was waiting for something, something to do with the cache, and I thought it had to do with offline stuff, so I deleted the offline.js file (the file list, mine has over 3000 lines) and then everything loads fine.

    Then I tried something else.

    When I kept the offline.js file, and instead altered the sw.js file at:

    function fetchWithBypass(request, bypassCache)

    and forced it to bypass the cache, then it also worked fine.

    But now (I believe) I'm not getting any offline features.

    Upon searching, I saw that Ashley had a blog post (https://www.construct.net/en/blogs/ashleys-blog-2/service-workers-pain-ass-934) about the Service Workers and Appcache, which looked to be really complicated, but this was also a number of years ago. Is there a new bug?

    Any ideas?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)