搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

[JavaScript] How to catch the error when the cache page is not found?

  • 1 个回答
  • 0 人有此问题
  • 1 次查看
  • 最后回复者为 cor-el

more options

I want to use the cache of the navigator, to get data stored before (and not to send the same data) with AJAX. So I use the error 304 to tell that the page was not change, so use the cache instead. In the other navigator, there are no error, but only a blank responseText. But with Firefox, the error "no element found" is displayed in the Error Console. Is there a possibility to not displayed it? Maybe with "catch" and "try", but I have no idea where to place it.

Thank you =)

User Agent

Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Iron/4.0.280.0 Chrome/4.0.280.0 Safari/532.9

I want to use the cache of the navigator, to get data stored before (and not to send the same data) with AJAX. So I use the error 304 to tell that the page was not change, so use the cache instead. In the other navigator, there are no error, but only a blank responseText. But with Firefox, the error "no element found" is displayed in the Error Console. Is there a possibility to not displayed it? Maybe with "catch" and "try", but I have no idea where to place it. Thank you =) == User Agent == Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Iron/4.0.280.0 Chrome/4.0.280.0 Safari/532.9

所有回复 (1)

more options

A good place to ask questions and advice about web development is at the MozillaZine Web Development/Standards Evangelism forum. The helpers at that forum are more knowledgeable about web development issues. You need to register at the MozillaZine forum site in order to post at that forum.

See http://forums.mozillazine.org/viewforum.php?f=25

You need to post a link to the website or relevant parts of the code.