javascript - Googlebots causes JS errors, should I care? -


on production server, watch js errors , send server:

<script type="text/javascript"> window.onerror=function(msg,url,line) {     if (window.xmlhttprequest)     {         var xmlhttp = new xmlhttprequest();     }     else     {         var xmlhttp = new activexobject('microsoft.xmlhttp');     }     xmlhttp.open('post', '/logjserrorshere', true);     xmlhttp.setrequestheader('content-type', 'application/x-www-form-urlencoded');     xmlhttp.send('msg='+encodeuricomponent(msg)+'&url='+encodeuricomponent(url)+'&line='+line);     return true; }</script> 

and logs "mysterious" errors: "$ not defined", of them comes "googlebot(at)googlebot.com" or spiderbot. should deal it?

depends :) if site readable , indexable out javascript (and site visible in search) wouldn't worry it, unless feel error indicative of bigger issue. can test using fetch , render in google webmaster tools.

if site relies on javascript render page (i.e. uses angularjs example) yes, fix it.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -