错误处理"内存异常和QUOT的;在浏览器? [英] Error handling "Out of Memory Exception" in browser?

查看:102
本文介绍了错误处理"内存异常和QUOT的;在浏览器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我调试使用大量的内存一个JavaScript / HTML5的Web应用程序。偶尔我得到在控制台窗口中的错误消息,

I am debugging a javascript/html5 web app that uses a lot of memory. Occasionally I get an error message in the console window saying

"uncaught exception: out of memory".  

有我优雅地在应用程序中处理此错误?办法

Is there a way for me to gracefully handle this error inside the app?

最后,我需要从摆在首位发生重新写的这部分prevent这一点。

Ultimately I need to re-write parts of this to prevent this from happening in the first place.

推荐答案

在有很多JS的项目和发送的Json工作时,但我找到了解决办法是更新输入类型我也得到了同样的错误消息近日= 提交属性,输入类型=按钮。我知道有利用输入类型=按钮..>和解决方案看起来怪异的限制,但如果你的应用程序具有Ajax和JS,JSON数据,你可以试试看。谢谢你。

I also got the same error message recently when working on a project having lots of JS and sending Json, but the solution which I found was to update input type="submit" attribute to input type="button". I know there are limitations of using input type="button"..> and the solution looks weird, but if your application has ajax with JS,Json data, you can give it a try. Thanks.

这篇关于错误处理"内存异常和QUOT的;在浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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