Search engine Crawl JS code experiment

Source: Internet
Author: User
Keywords Java search engine text

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

JavaScript in the page there are 2 common ways, one is JS made external files, page directly call, the following is a line of Shanghai SEO Lab Code:

the following references:


<script language= "JavaScript" src= "Http://www.seotest.cn/script/common.js" type= "Text/javascript" ></ Script>

The other is to write the JS code directly on the page, for example:

the following references: <script language= "JavaScript" >


try{


var elscript = document.createelement ("script");


Elscript.setattribute ("Language", "JavaScript");


Elscript.setattribute ("src", "http://www.seotest.cn/function/c_html_js.asp?act=batch" + "&view=" + Escape (  Strbatchview) + "&inculde=" + Escape (Strbatchinculde) + "&count=" + Escape (strbatchcount));


document.getElementsByTagName ("body") [0].appendchild (Elscript);


        }


catch (e) {};


</script>

From the search engine crawl point of view, the first does not contain any text information, so the search engine cannot extract content from it. But the second if the text content, the search engine can crawl the contents of it?

Experiment idea: Make a only JS code page, JS code contains Chinese content. Then wait for the search engine to include the results in Serp and a snapshot of the page.

Experiment page: ([Url=http://www.seotest.cn/testpage/tp009.html]http://www.seotest.cn/testpage/tp009.html[/url])

The following is the referenced content:<html>


<head>


<meta http-equiv= "Content-type" content= "HTML; charset=gb2312 "/>


<title>2007-9-25 The beginning of the Mid-Autumn Festival experiment </title>


</head>





<body>


<script type= "Text/javascript" >


Document.writeln ("JS Crawl Experiment:<br>");


Document.writeln ("Try to put the text in the JS code, will be search engine crawl to it?" ");


</SCRIPT>


</body>


</html>

If you would like to see the results of the experiment as soon as possible, please reprint this article or add external links to the experimental page, which will help the search engine to collect the page as soon as possible, we will be able to get results faster.

Author: kyw@ Shanghai 863.html ">seo Search engine Optimization Laboratory (Zebian admin01)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.