Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
对我来说,iPad 在大约 8 或 9 张图像后停止加载大图像,因为页面达到了分配的内存限制。
由于我一次只显示这些图像,因此我想从浏览器缓存中删除旧图像,以免达到限制。
关于如何在 javascript 中执行此操作的任何想法?
请参阅此问题以获得一个好的答案。简而言之,您应该使用相同的图像对象并设置 src 而不是创建新图像。