在移动Safari中屏蔽屏幕图片 [英] Cache images offscreen in Mobile Safari

查看:441
本文介绍了在移动Safari中屏蔽屏幕图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个javascript图片库,在移动Safari中的屏幕外的图片中滑动。看起来像离线屏幕图像没有缓存,因为每次他们滑入它需要几秒钟加载它们,在这一点,他们已经到达目的地的一半。我试图获取所有的图像加载初始页面加载。看来移动Safari忽略或垃圾收集屏幕图像。有没有办法通过CSS3(一些-webkit前缀属性)或任何方式,使所有图像加载和保持加载,所以他们不闪烁。



谢谢! >

解决方案

如果图库中的图像集合有点静态(即通过某种上传过程管理,而不是动态地),您可以尝试为图片使用HTML5离线应用缓存。 此博客文章介绍了技术,以及iPhone缓存常常遇到的一些其他陷阱。 p>

I have an javascript image gallery that slides in images from offscreen in Mobile Safari. It seems like the offscreen images are not getting cached because every time they slide in it takes a few seconds to load them at which point they are already halfway to their destination. I'm trying to get all the images to load during the initial page load. It seems Mobile Safari ignores or "garbage collects" offscreen images. Is there a way through CSS3 (some -webkit prefix property) or any way so that all images load and stay loaded so their is no flickering.

Thanks!

解决方案

If the set of images in the gallery is somewhat static (ie. it's managed through some sort of upload process rather than picking up images dynamically), you could try using an HTML5 offline application cache for your images. This blog post describes the technique, along with some other pitfalls frequently encountered with iPhone caching.

这篇关于在移动Safari中屏蔽屏幕图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆