简体   繁体   English

连续更新图像时,移动浏览器(iPad / iPhone / iPod / Android)崩溃javascript

[英]Mobile Browser (iPad/iPhone/iPod/Android) crashes when updating image continuously javascript

we are trying to update the image src with base64 string using data URIs on our webpage every second with Java Script. 我们正在尝试使用Java脚本每秒使用网页上的数据URI使用base64字符串更新image src。

Java Script(AJAX) gets the latest image from webserver. Java Script(AJAX)从Web服务器获取最新图像。

But all mobile browsers crashing after 5-10 mins. 但是所有移动浏览器在5-10分钟后崩溃。 crash dump says, browser is crashing because of low memory. 故障转储说,浏览器由于内存不足而崩溃。

is there any way to cleanup the memory programatically. 有没有办法以编程方式清理内存。

thanks in Advance. 提前致谢。

Regards, Kartheek 此致Kartheek

I haven't tested this myself but according to a comment on this webpage: 我尚未对此进行测试,但根据对该网页的评论:

cubiq.org/testing-memory-usage-on-mobile-safari cubiq.org/testing-memory-usage-mobile-safari

base64 string images are not properly garbage collected by MobileSafari, causing MobileSafari to crash at what seems random places. base64字符串图像未由MobileSafari正确地进行垃圾回收,从而导致MobileSafari在看起来随机的位置崩溃。 I think it's worth trying to use regular image links and see what happens. 我认为值得尝试使用常规图像链接并查看会发生什么。

Also keep in mind that there is an image data memory limit around 10M. 还请记住,图像数据的存储限制约为10M。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM