Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Web GL cache on game load.

Discussion in 'Web' started by Shadowing, May 5, 2017.

  1. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,647
    Im on version 5.6 p3 The newest version.

    Looks like cache is some what working once again on Chrome. Its the same on Firefox. At least those two are matching perfectly.
    It does load much faster now. It doesn't seem its redownloading the entire game over again.
    but it looks like its still downloading something or loading something. Still a 1 minute loading time though.
    Might be a 30 second load idk. sure it depends on connection. I only have 10mbits down.

    https://dakara.systemlords.26horses.com/web_gl/3.3/index.html
     
    Last edited: May 5, 2017
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    Looks like https://dakara.systemlords.26horses.com/web_gl/3.3/Build/3.3.data.unityweb is downloaded every time. Probably too big to be cached (~78mb)

    try moving as many assets to asset bundles.
     
  3. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,647
    Thanks for the response man. I haven't looked into asset bundles yet lol. I don't use any at the moment.
    I'll check into that then.

    I swear it used to cache in the past. In like version 5.4 or something. But it quickly stopped just a few versions later.
    I don't know why 78mb would be to big to cache. Cause really the point of cache should be for large stuff. Why would we want to cache small stuff on load. Its also the year 2017. Is this just browsers being lame with memory?

    Does asset bundles make use of html 5 or something?
     
    Gotama likes this.
  4. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,647
    I haven't used Asset bundles yet. But I manage to reduce my game size down to 49.3mb and it still doesn't cache.
    Its under 50mb? whats the point in the web gl cache feature if it doesn't cache?
    Seems broken to me. I swear it used to cache. Several Unity versions back it was caching.
    https://dakara.systemlords.26horses.com/web_gl/4.1/index.html
     
  5. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    have you tried more than one browser?
     
  6. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,647
    I've been using chrome. I just noticed it does cache on firefox.
    It also caches in Microsoft Edge browser interesting enough. The mouse doesn't show up on the edge browser for some reason.

    so chrome just doesn't cache. I also notice that player saved preferences doesn't save either on chrome.
     
    Last edited: Jul 9, 2017
  7. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,647
    I was wrong about player preference not working on chrome. My bad.
    So really it's just cache.
    @Marco-Trivellato you can see I've made giant improvements.
    Using the other compression option I decreased it down to 39.5mb now.
    Also a ton of screen size and delivery improvements.

    The way I have the game using and maintaining full view port screen size is incredible. Should really be a standard option when doing a web gl build.
    I use expand canvas, adjust game content div to what the users viewport is and then reset it on screen resize and there is no throttling on that.

    Https://systemlords.26horses.com
     
    Last edited: Jul 23, 2017
  8. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,647
    Ok so it turns out a friend of mine loaded my game on chrome and it caches the game. also double checking with dev tools. For some reason my chrome doesn't cache it.
    I uninstalled chrome and installed it back. Disabled any plug ins and my virus scanner and still doesn't cache my game.
     
  9. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,647
    Last edited: Jul 27, 2017
  10. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,647
    I reformated my computer and now chrome caches the game.
    So no idea what all that was about lol.