(Case 1379401) [WebGL][iOS] Non cached app launch faster than cached

  1. What happened
    After upgrade to iOS 15 web gl app is take much longer time to launch only when application is already cached.
    So when you open app first time it’s runs as it should be and comparable to Android.

In case if you press reload page after app was loaded it takes 2-3 more time to launch than first time which is ridiculous and non logical behaviour.
I spend week on trying to figure out what’s happens under the hood, tried to disable data caching in project settings, and in index.html by using but no result. Also Safari Web inspector provide very limited tools, so it makes problem harder to resolve.

My app was business-ready and have nice sells across the world, but now customers just give up and close application while waiting to load.

So I found that problem depends only on wasm file size, so I created simple project which just referes to use built-in assemblies to increase the size of wasm file so problem will be more noticeable.

  1. How can we reproduce it using the example you attached
    Just unzip file and open in latest Unity version and hit Build&Run, then open application from iPhone/iPad, wait till app is loaded and record time which was taken, then reset stopwatch and hit reload page.
    In my case it was 2-3 times longer than first time.

By the way problem is reproducible on XCode simulator, which makes it easies to debug.

And just for comparison you could do the same on any Android phone (mine was Samsung S21) So for me on android is launch app after it was cached instantly. and that’s the result which I want to achieve for iOS.

P.S. I know you might say that mobile browser isn’t supported and etc, but on your roadmap for web gl you have mobile browser support, so this case might help for unity team to become a bit closer for mobile support.

Anyone could try to recreate this bug, I attached project zip.

7641532–952117–iOS Loading Issue.zip (1.27 MB)

Bump

So header Cache-Control: no cache doesn’t help

On Unity 2018 LTS it works super fast. So temporarily I had to downgrade and sacrifice compressed texture support

1 Like