javascript - Is it possible to catch net::ERR_BLOCKED_BY_CLIENT? -


so on our site have various searches of work fine , return appropriate results. few of them return javascript error:

failed load resource: net::err_blocked_by_client when search on machine.

i have found out issue running adblocker in google chrome , adblocker causing problem. know turn adblocker off fine , have, there way me catch error in javascript , report user why not getting search results?

ideally after similar c# try/catch.

edit: ok, after digging around , being pointed in right direction comments below think have deduced issue, others.

after having read this looks trying accomplish cannot done using version of jquery running (1.10.x) guess solution use new version of jquery (2.x) , see if can catch error

unfortunately cannot catch error message specifically, can catch error itself:

$.ajax({   url: 'http://openx.net',   datatype: 'json',   success: function( data ) {     console.log( "success:", data);   },   error: function( data ) {     console.log( "error:", data);   } }); 

chrome blocking ad call

obviously example isn't requesting json, can see fails , calls error handler.

these errors fired chrome when, instance, plugin adblock (as mentioned) cancels request.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -