2018年12月2日 星期日

Google Crawler 爬取後 Google Search 會索引 javascript 內容嗎?


Google Crawler 爬取後 Google Search 會索引 javascript 內容嗎?

網頁內有ajax call 與 javascript生成的頁面,Google Crawler 爬取後,是會索引有執行 javascript 的頁面內容的。

如果有使用javascript可是頁面快取並沒有如需要的樣子,
可能是 使用了 Google Web Render Service 目前不支援的 javascript 。
Understand rendering on Google Search  |  Search  |  Google Developers https://developers.google.com/search/docs/guides/rendering

"WRS does not support ES6
Chrome M41 does not support ES6 features (for example classes). If you are using ES6 make sure to transpile your JavaScript to ES5."

所以,像是 let 這樣的語法就不能使用,
或是像是 urlsearchparams ,Chrome M41 也完整支援,所以才導致使用這些語法的頁面沒有被執行索引內容。


沒有留言:

張貼留言