Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question How to get around clearing cache on hosted WebGL builds?

Discussion in 'Web' started by mcbauer, Mar 12, 2024.

  1. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    526
  2. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,082
    doesnt turning off data caching help?
     
  3. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    526
    Yes that did it, thanks!

    What I don't understand though is that with it on, I had to clear the cache every time to get around the error. it never cached the data and let me through.

    In my situation, I was making updates daily so I get needing to clear it, but there are plenty of times where the site just should have been able to load what was cached with no issues, yet, the error remained.
     
  4. ferretnt

    ferretnt

    Joined:
    Apr 10, 2012
    Posts:
    416
    Yeah I see the same problem when iterating (hosting on firebase), assuming you see a stackoverflow error on wasm init when loading. I can repro with a project with no C# scripts at all which makes it particularly annoying.

    anecdotally I think using “file names as hashes” helps (presumably because then modified content files have different names) but would love to know the real reason.