Javascript會影響搜尋引擎抓取, 這是大多的SEO流傳的觀念, 這個問題跟”動態還是靜態的URL比較好?”一樣, 表示觀念還停留在三五年以前, 這個跟”SEO : 搜尋引擎無法索引Flash檔案?“問題也是類似, 就看你如何處理…
如果你在Flash中把文字轉成圖形物件, 搜尋引擎抓得到文字才有鬼, 所以問題不在”搜尋引擎是否可以索引Flash檔案”, 問題在你的檔案呈現給搜尋引擎什麼樣子, 而你所針對的是Google?Yahoo?還是Baidu?
回到主題, Javascript 會影響搜尋引擎抓取?
Javascript是Client-Side的程式碼, 也就是執行在你的browser, 而且Javascript在不同的browser可能有不同的結果, 有些browser可以執行, 但某些語法不支援則會出現錯誤或沒有輸出
因此原則很簡單:
(1)你的Javascript是否在Windows/Linux的IE/FireFox/Chrome…等browser都可以執行?
(2)你的Javascript執行是否可能很久或timeout, 或浪費resource?
如果你的Javascript使用標準語法(各平台都正確), 並且不需等待太久…..那搜尋引擎會抓取執行結果
如果你的Javascript非使用標準語法(某些平台無法run), 或需waiting或使用大量array…..那搜尋引擎大多會bypass
多久算是waiting? 目前沒有可靠數字, Javascript去load flash時, Google就會bypass
因此Javascript 會影響搜尋引擎抓取? 答案是yes and no(針對Google/Yahoo), 完全看是否思考上面兩個問題
後記: 2009/03/27
Google是否會index flash? Google已經說明哪些情況會抓取flash的text, 看過這篇文章”Are The Search Engines Really Indexing Flash?“
這位作者是某SEO廠商的CEO, 她說:
Guess what? Most Flash is still highly invisible in Google.
To test this, I went directly to some Flash sites, and pasted exact words contained within their Flash into Google (using quotes) and most of the sites did not show up in the search results. Upon review of the source code of two sites that did show up I found that one was using the phrase I looked for within their Meta description (see… meta descriptions actually DO count for something with Google, despite what some will tell you). The other site had lots of text within the code beneath the Flash so that search engines and browsers without Flash would have some meaningful info. While that’s a good alternative, the info they had was very different from the info contained in their Flash. That’s a bit of a dangerous game to play with the search engines if you ask me. If that info is good enough for search engines and iPhones, why isn’t it good enough for your most important users?
她去測試一些有flash的網站, 發現許多在flash的文字都沒有被Google index, 所以她結論: 大多的flash還是沒被Google抓來index……
嗚呼哀哉……..她大概沒做過flash, 在flash看到的文字不一定是真的text, 有些為了字形美觀或效果, 必須轉換成graphic圖形物件, 光是外部觀察是不容易看出哪些是真的text, 除非你自己電腦的font去變動, 看該flash是否會依你的變動而不同, 如果會的話就是真的text, 不過這個應該沒人這麼閒去做這個測試, 而且大同小異的font這麼多, 你也很難猜出他真正用的font, 而且以javascript去load flash, 就算是flash中是純text, Google也不會抓, 這位CEO的建議是對的, 但是判斷過程是錯誤的……
當然無意義的flash應該盡量減少, 使用flash還是要以HTML搭配, flash text是否可以被Google index也不是太大的問題, 但在這麼出名的網站, 這麼高階的SEO主管都會下這種判斷, 可見沒有追上技術實在很難搞SEO
自動引用通知: Google可以索引AJAX與Javascript內容? « 搜尋引擎 « 台灣搜尋引擎優化與行銷研究院:SEO:SEM