Search Unity

[WebGL] .datagz file can not got cached by Chrome

Discussion in 'Web' started by CuongV, Aug 11, 2016.

  1. CuongV

    CuongV

    Joined:
    Aug 11, 2016
    Posts:
    1
    Hi.I made a game with Unity 5.3.5.f1 and tried to export to webGL
    Everything is fines except my .datagz file is quite big ( 75 mb) and it was not cached by Chrome ( its was cached when i test on Firefox, i also enabled "Data caching" in "PlayerSettings" ).
    It's not so good when every time user refresh the browser they have to wait to download 75 mb file again!
    Chrome cached all files but .datagz file.
    Maybe it's because of file size too big?Is there any limit on files size cached by Chrome?
    Thanks in advance!
     
  2. pera2

    pera2

    Joined:
    Aug 10, 2016
    Posts:
    14
  3. Miiirage

    Miiirage

    Joined:
    May 13, 2016
    Posts:
    8
    We're facing a similar situation where a file was ~68mb large (without compression). The file would simply not be cached by either Firefox or Chrome. Then we compressed (gzip) the file and the browser cached it just fine. These browsers seem to have some sort of limit on per-file size. Could not find any official documentation on either Firefox or Chrome on these limitations.
     
    ilmario likes this.
  4. Alvaro_Spain

    Alvaro_Spain

    Joined:
    Sep 15, 2016
    Posts:
    13
    In a wonderful video, "Bringing Top Eleven to WebGL" (
    ), that I recommend to watch, the devs say that, after much trial and error, they discovered that 30 Mb is the size of the file that every browser will cache.
     
    ilmario likes this.
  5. Miiirage

    Miiirage

    Joined:
    May 13, 2016
    Posts:
    8
    Very interesting! Thanks for the share Alvaro.