Problems:
- Setting an un-cached url to an
img src gives a 50-200ms freeze on an iPhone 6.
- iOS UIWebView doesn't properly cache remote image urls. Even after setting once to a url, setting again to the same url will cause a noticeable freeze.
Solutions:
- Use a web worker to fetch image
srcs, convert them to base 64, and give them back as a data-uri.
- This works.. almost. Once an image has been set to a data-uri once, the WebView does properly cache the uri and reloads it instantly when it's set the next time.
The last solution needed is a way to cache the data uri into the webview beforehand. This will require some experimentation, but it's doable.