AJAX 檢索配置即將走入歷史
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
2015年12月17日星期四
要點:目前已不建議您採用我們於
2009 年
提出的
AJAX 檢索方案
。
我們於 2009 年提出了讓
AJAX 網頁可供檢索的方案
。在當時的環境下,如果網頁透過 JavaScript 將內容提供給使用者,我們的系統還無法轉譯及解讀這類網頁。由於「
檢索器 … (當時) 無法查看任何 … 動態建立的內容
」,我們便建議了一套做法供網站管理員採用,以確保搜尋引擎將他們的 AJAX 應用程式編入索引。
然而,情況已經隨著時間改變。現在,只要您未禁止 Googlebot 檢索您的 JavaScript 或 CSS 檔案,我們通常都能跟
新型瀏覽器一樣轉譯及解讀您的網頁
。為了反映這方面的進步,我們最近
更新了《網站管理員指南》
技術內容,建議網站管理員不要禁止 Googlebot 檢索網站的 CSS 或 JS 檔案。
由於我們在 2009 年所提方案的假設前提已不成立,建議您改為遵
循漸進增
強原則。舉例來說,您可以使用
History API pushState()
,確保各款瀏覽器 (以及我們的系統) 都能順利存取網站。
問與答
問:我的網站目前遵照 Google 的建議運作,並且支援 _escaped_fragment_。Google 撤回這項提案後,是否會因此不再為我的網站建立索引?
答:不會,我們還是會為您的網站建立索引,但基本上我們建議您在下次更新網站時採用業界最佳做法。一般來說,我們會檢索、轉譯並編入索引的是 #! 網址,而不是 _escaped_fragment_ 網址。
問:捨棄 AJAX 檢索提案並改採業界最佳做法代表要遷移網站嗎?是否需要實作重新導向?
答:如果您目前的設定運作正常,就不必立即做出任何變更。如果您目前正在建置新網站或調整現有網站結構,只要避免導入 _escaped_fragment_ 網址即可。
問:我採用 JavaScript 框架,而且我的網頁伺服器會放送預先轉譯的網頁。這種做法依然可行嗎?
答:一般來說,網站不該只針對 Google 預先轉譯網頁;預先轉譯網頁是為了提供更流暢的使用者體驗,因此我們建議您遵循漸進增強原則。如果您預先轉譯網頁,請確定您提供給 Googlebot 的內容與使用者看到的內容相符 (包括顯示方式和互動方式)。如果您提供給 Googlebot 的內容和一般使用者看到的內容有所不同,我們會將此視為違反《網站管理員指南》規定的偽裝手法。
如有任何疑問,歡迎在這裡或前往
網站管理員說明論壇
提問。
張貼者:搜尋品質分析人員
Kazushi Nagayama
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2015-12-01 (世界標準時間)。
[null,null,["上次更新時間:2015-12-01 (世界標準時間)。"],[[["\u003cp\u003eGoogle is retracting its 2009 recommendation for AJAX crawling using \u003ccode\u003e_escaped_fragment_\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eGooglebot can now render and understand web pages like modern browsers, including JavaScript and CSS, making the previous AJAX crawling proposal obsolete.\u003c/p\u003e\n"],["\u003cp\u003eWebsites are encouraged to adopt progressive enhancement principles, ensuring content accessibility for a wider range of browsers and search engines.\u003c/p\u003e\n"],["\u003cp\u003eWhile websites using \u003ccode\u003e_escaped_fragment_\u003c/code\u003e will still be indexed, Google recommends implementing industry best practices, like using \u003ccode\u003e#!\u003c/code\u003e URLs or History API's \u003ccode\u003epushState()\u003c/code\u003e, for new or restructured websites.\u003c/p\u003e\n"],["\u003cp\u003ePre-rendering pages for performance benefits is acceptable, but the content served to Googlebot must match the user's experience to avoid cloaking.\u003c/p\u003e\n"]]],["Google is no longer recommending the 2009 AJAX crawling proposal. Google's systems can now render and understand JavaScript-driven content, similar to modern browsers, provided Googlebot isn't blocked from accessing JavaScript or CSS files. Sites using the old `_escaped_fragment_` method will still be indexed, but new implementations should avoid it. Instead, use progressive enhancement principles and ensure the content served to Googlebot matches the user experience. Pre-rendering for general user benefits is acceptable, but cloaking is not.\n"],null,["# Deprecating our AJAX crawling scheme\n\nWednesday, October 14, 2015\n\n\nIn short: We are no longer recommending the [AJAX crawling](/search/docs/ajax-crawling)\nproposal we made\n[back in 2009](/search/blog/2009/10/proposal-for-making-ajax-crawlable).\n\n\nIn 2009, we made a\n[proposal to make AJAX pages crawlable](/search/blog/2009/10/proposal-for-making-ajax-crawlable).\nBack then, our systems were not able to render and understand pages that use JavaScript to present\ncontent to users. Because\n\"[crawlers are not able to see any content created dynamically](/search/docs/ajax-crawling/learn-more)\",\nwe proposed a set of practices that webmasters can follow in order to ensure that their AJAX-based\napplications are indexed by search engines.\n\n\nTimes have changed. Today, as long as you're not blocking Googlebot from crawling your JavaScript\nor CSS files, we are generally able to\n[render and understand your web pages like modern browsers](/search/blog/2014/05/understanding-web-pages-better).\nTo reflect this improvement, we recently\n[updated our technical Webmaster Guidelines](/search/blog/2014/10/updating-our-technical-webmaster)\nto recommend against disallowing Googlebot from crawling your site's CSS or JS files.\n\n\nSince the assumptions for our 2009 proposal are no longer valid, we recommend following the\nprinciples of\n[progressive enhancement](https://en.wikipedia.org/wiki/Progressive_enhancement).\nFor example, you can use the\n[`History API pushState()`](https://developer.mozilla.org/en-US/docs/Web/API/History_API)\nto ensure accessibility for a wider range of browsers (and our systems).\n\nQuestions and answers\n---------------------\n\n\n**Q: My site currently follows your recommendation and supports `_escaped_fragment_`.\nWould my site stop getting indexed now that you've deprecated your recommendation?** \n\nA: No, the site would still be indexed. In general, however, we recommend you implement industry\nbest practices when you're making the next update for your site. Instead of the\n`_escaped_fragment_` URLs, we'll generally crawl, render, and index the\n`#!` URLs.\n\n\n**Q: Is moving away from the AJAX crawling proposal to industry best practices considered a site\nmove? Do I need to implement redirects?** \n\nA: If your current setup is working fine, you should not have to immediately change anything. If\nyou're building a new site or restructuring an already existing site, simply avoid introducing\n`_escaped_fragment_` urls.\n\n\n**Q: I use a JavaScript framework and my webserver serves a pre-rendered page. Is that still\nok?** \n\nA: In general, websites shouldn't pre-render pages only for Google---we expect that you might\npre-render pages for performance benefits for users and that you would follow progressive\nenhancement guidelines. If you pre-render pages, make sure that the content served to Googlebot\nmatches the user's experience, both how it looks and how it interacts. Serving Googlebot different\ncontent than a normal user would see is considered cloaking, and would be against our Webmaster\nGuidelines.\n\n\nIf you have any questions, you can post them here, or\n[in the webmaster help forum](https://support.google.com/webmasters/go/community).\n\n\nPosted by\n[Kazushi Nagayama](https://plus.google.com/+KazushiNagayama/), Search\nQuality Analyst"]]