December 23, 201114 yr Hi, Currently I am working on a small project, and to get the layout I want, I've implemented this script: <script type="text/javascript"> var bustcachevar=1 var loadedobjects="" var rootdomain="http://"+window.location.hostname var bustcacheparameter="" function ajaxpage(url, containerid){ var page_request = false if (window.XMLHttpRequest) page_request = new XMLHttpRequest() else if (window.ActiveXObject){ try { page_request = new ActiveXObject("Msxml2.XMLHTTP") } catch (e){ try{ page_request = new ActiveXObject("Microsoft.XMLHTTP") } catch (e){} } } else return false page_request.onreadystatechange=function(){ loadpage(page_request, containerid) } if (bustcachevar) bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime() page_request.open('GET', url+bustcacheparameter, true) page_request.send(null) } function loadpage(page_request, containerid){ if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)) document.getElementById(containerid).innerHTML=pag e_request.responseText } function loadobjs(){ if (!document.getElementById) return for (i=0; i<arguments.length; i++){ var file=arguments var fileref="" if (loadedobjects.indexOf(file)==-1){ if (file.indexOf(".js")!=-1){ fileref=document.createElement('script') fileref.setAttribute("type","text/javascript"); fileref.setAttribute("src", file); } else if (file.indexOf(".css")!=-1){ fileref=document.createElement("link") fileref.setAttribute("rel", "stylesheet"); fileref.setAttribute("type", "text/css"); fileref.setAttribute("href", file); } } if (fileref!=""){ document.getElementsByTagName("head").item(0).appe ndChild(fileref) loadedobjects+=file+" " } } } </script> My question: Will this affect SEO adversely? As well, does using this script have any other negative effects? It basically loads separate internal content into a specified <div>, as opposed to loading the entire page - but - I've heard it can hurt in the search engine department. Any advice is greatly appreciated, thank you.
December 24, 201114 yr If you are hiding text content then yes it probably will adversely affect the SEO, Google is also known to read javascript and they could be curious enough to perform a human inspection if they suspect that you are cloaking the true nature of the site from the googlebot.
Create an account or sign in to comment