Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

En savoir plus

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

  • 1 réponse
  • 0 a ce problème
  • 1 vue
  • Dernière réponse par 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

Toutes les réponses (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.