Ahora estamos en LinkedIn: para obtener noticias y recursos de la Búsqueda de Google sobre cómo hacer que tu sitio sea visible,
síguenos en LinkedIn.
Propuesta para hacer AJAX rastreable
Organízate con las colecciones
Guarda y clasifica el contenido según tus preferencias.
viernes, 6 de noviembre de 2009
Estamos entusiasmados de poder proponer un nuevo estándar para poder hacer rastreables los sitios web basados en AJAX. Esto beneficiará a webmasters y usuarios, por hacer que contenidos ricos e interactivos basados en AJAX estén disponibles de manera universal a través de los resultados de búsqueda o de cualquier motor de búsqueda que participe. Creemos que hacer disponible este contenido para rastreo e indexación puede mejorar de manera significativa la web.
Si bien las páginas web basadas en AJAX son populares entre los usuarios, los motores de búsqueda tradicionales no son capaces de acceder a este tipo de contenido. La última vez que revisamos, casi el 70% de los sitios web que conocemos utilizaban JavaScript de alguna manera. Por supuesto, la mayoría de ese JavaScript no es AJAX, pero cuanto mejor se pueda rastrear e indexar AJAX, más desarrolladores podrán añadir características más completas a sus sitios web y seguir apareciendo en los motores de búsqueda.
Algunos de los objetivos que queremos alcanzar con esta propuesta son:
-
Realizar cambios mínimos que son necesarios conforme crece la web.
-
Visualización de un mismo contenido por parte de usuarios y motores de búsqueda (no encubrimiento o cloaking).
-
Posibilidad por parte de los motores de búsqueda de enviar a los usuarios directamente a la URL de AJAX (no a una copia estática).
-
Verificación de sitios web en AJAX por parte de los propietarios de una forma correcta, de manera que el rastreador tenga acceso a todo el contenido.
Así es como los motores de búsqueda rastrean e indexan AJAX de acuerdo con nuestra propuesta inicial:
-
Modificar ligeramente los fragmentos de URL para obtener páginas AJAX con estado:
Las páginas en AJAX con estado muestran el mismo contenido cada vez que se accede a éste directamente. Se trata de páginas que podrían aparecer en los resultados de búsqueda. En lugar de una URL como
https://example.com/page?query#state
, nos gustaría añadir una marca para poder reconocer estas URL:
https://example.com/page?query#[FRAGMENTTOKEN]state
. Basándonos en una revisión de las URL que actualmente hay en la web, se propone utilizar "!" (Un signo de exclamación) para marcarlas. La URL propuesta que podría mostrarse en los resultados de búsqueda sería entonces:
https://example.com/page?query#!state
.
-
Utilizar un navegador sin interfaz gráfica que produzca una instantánea en HTML en el servidor web:
El navegador sin interfaz gráfica se utiliza para acceder a la página AJAX y genera el código HTML basado en el estado final del navegador. Sólo las URL especialmente etiquetadas se pasan al navegador sin interfaz gráfica para que se procesen. Al hacer esto, por parte del servidor, el propietario del sitio web controla el código HTML que se genera y se puede verificar fácilmente que el JavaScript se está ejecutando correctamente. Un ejemplo de navegadores de este tipo es
HtmlUnit
, un navegador de código abierto para programas Java sin interfaz gráfica.
-
Permitir que los rastreadores de los motores de búsqueda accedan a estas URL omitiendo el estado:
Como los fragmentos de URL no se envían con las solicitudes a los servidores, es necesario modificar ligeramente la dirección URL utilizada para acceder a la página. Al mismo tiempo, esto indica al servidor que utilice el navegador sin interfaz gráfica para generar código HTML en lugar de devolver una página con JavaScript. Otras URL existentes (como las que utilizan los usuarios) se procesan con normalidad, evitando el navegador sin interfaz gráfica. Proponemos omitir la información de estado y agregarla a los parámetros de consulta con un símbolo. Utilizando el ejemplo anterior, una URL sería
https://example.com/page?query&[QUERYTOKEN]=estado
. Basándonos en nuestro análisis actual de las URL en la web, proponemos utilizar "_escaped_fragment_" como fragmento. La dirección URL propuesta sería entonces
https://example.com/page?query&_escaped_fragment_=state
.
-
Mostrar la URL original a los usuarios en los resultados de búsqueda:
Para mejorar la experiencia del usuario, tiene sentido enviar a los usuarios directamente a las páginas en AJAX. Esto se puede lograr mostrando la URL original (como
https://example.com/page?query#!state
de nuestro ejemplo anterior) en los resultados de búsqueda. Los motores de búsqueda pueden comprobar que el texto indexable devuelto a Googlebot es el mismo o un fragmento de texto que se devuelve a los usuarios.
En resumen, a partir de una URL con estado como
https://example.com/dictionary.html#AJAX
, podría estar disponible tanto para los rastreadores como para los usuarios
https://example.com/dictionary.html#!AJAX
, que podría ser rastreado como
https://example.com/dictionary.html?_escaped_fragment_=AJAX
, que a su vez se mostraría a los usuarios y sería accesible como
https://example.com/dictionary.html#!AJAX
Actualmente estamos trabajando en una propuesta y un prototipo de aplicación. Se agradecerán todos los comentarios que nos hagáis. No dudéis en añadir
vuestras opiniones
en la sección de comentarios a continuación, o en nuestro
Foro para webmasters
. ¡Gracias por vuestro interés en hacer una web basada en AJAX accesible y útil a través de los motores de búsqueda!
Publicado por John Mueller, Webmaster Trends Analyst (Traducido por Cristina, equipo de Calidad de búsqueda). Propuesta de Katharina Probst, Bruce Johnson, Arup Mukherjee, Erik van der Poel, y Li Xiao, Google.
A menos que se indique lo contrario, el contenido de esta página está sujeto a la licencia Reconocimiento 4.0 de Creative Commons y las muestras de código están sujetas a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio web de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2009-11-01 (UTC).
[null,null,["Última actualización: 2009-11-01 (UTC)."],[[["\u003cp\u003eThis proposal aims to make AJAX-based websites crawlable by search engines, improving content accessibility for users.\u003c/p\u003e\n"],["\u003cp\u003eThe proposal suggests modifying URL fragments for stateful AJAX pages using "!" as a token for recognition.\u003c/p\u003e\n"],["\u003cp\u003eA headless browser is utilized to generate an HTML snapshot of the AJAX page for search engine indexing.\u003c/p\u003e\n"],["\u003cp\u003eSearch engine crawlers access these snapshots through escaped fragment URLs containing state information.\u003c/p\u003e\n"],["\u003cp\u003eUsers are directed to the original AJAX URLs in search results, ensuring a better user experience.\u003c/p\u003e\n"]]],["The proposal introduces a new standard for crawling AJAX-based websites. Key actions include modifying stateful AJAX URLs by adding a \"!\" token (e.g., `#!state`) and using a headless browser to generate HTML snapshots. Search engine crawlers can access these URLs by escaping the state information into query parameters with `_escaped_fragment_`. The original AJAX URL is shown in search results. This method aims to make AJAX content accessible to search engines, benefiting both users and webmasters.\n"],null,["# A proposal for making AJAX crawlable\n\n| It's been a while since we published this blog post. Some of the information may be outdated (for example, some images may be missing, and some links may not work anymore).\n\nWednesday, October 07, 2009\n\n\nToday we're excited to propose a new standard for making AJAX-based websites crawlable. This will\nbenefit webmasters and users by making content from rich and interactive AJAX-based websites\nuniversally accessible through search results on any search engine that chooses to take part. We\nbelieve that making this content available for crawling and indexing could significantly improve\nthe web.\n\n\nWhile AJAX-based websites are popular with users, search engines traditionally are not able to\naccess any of the content on them. The last time we checked, almost 70% of the websites we know\nabout use JavaScript in some form or another. Of course, most of that JavaScript is not AJAX, but\nthe better that search engines could crawl and index AJAX, the more that developers could add\nricher features to their websites and still show up in search engines.\n\nSome of the goals that we wanted to achieve with this proposal were:\n\n- Minimal changes are required as the website grows\n- Users and search engines see the same content (no cloaking)\n- Search engines can send users directly to the AJAX URL (not to a static copy)\n- Site owners have a way of verifying that their AJAX website is rendered correctly and thus that the crawler has access to all the content\n\nHere's how search engines would crawl and index AJAX in our initial proposal:\n\n- **Slightly modify the URL fragments for stateful AJAX pages** \n Stateful AJAX pages display the same content whenever accessed directly. These are pages that could be referred to in search results. Instead of a URL like `https://example.com/page?query#state` we would like to propose adding a token to make it possible to recognize these URLs: `https://example.com/page?query#[FRAGMENTTOKEN]state`. Based on a review of current URLs on the web, we propose using \"!\" (an exclamation point) as the token for this. The proposed URL that could be shown in search results would then be: `https://example.com/page?query#!state`.\n- **Use a headless browser that outputs an HTML snapshot on your web server** \n The headless browser is used to access the AJAX page and generates HTML code based on the final state in the browser. Only specially tagged URLs are passed to the headless browser for processing. By doing this on the server side, the website owner is in control of the HTML code that is generated and can easily verify that all JavaScript is executed correctly. An example of such a browser is [HtmlUnit](https://htmlunit.sourceforge.net/), an open-sourced \"GUI-less browser for Java programs.\n- **Allow search engine crawlers to access these URLs by escaping the state** \n As URL fragments are never sent with requests to servers, it's necessary to slightly modify the URL used to access the page. At the same time, this tells the server to use the headless browser to generate HTML code instead of returning a page with JavaScript. Other, existing URLs - such as those used by the user - would be processed normally, bypassing the headless browser. We propose escaping the state information and adding it to the query parameters with a token. Using the previous example, one such URL would be `https://example.com/page?query&[QUERYTOKEN]=state`. Based on our analysis of current URLs on the web, we propose using `_escaped_fragment_` as the token. The proposed URL would then become `https://example.com/page?query&_escaped_fragment_=state`.\n- **Show the original URL to users in the search results** \n To improve the user experience, it makes sense to refer users directly to the AJAX-based pages. This can be achieved by showing the original URL (such as `https://example.com/page?query#!state` from our example above) in the search results. Search engines can check that the indexable text returned to Googlebot is the same or a subset of the text that is returned to users.\n\n\nIn summary, starting with a stateful URL such as\n`https://example.com/dictionary.html#AJAX`, it could be available to both crawlers and\nusers as `https://example.com/dictionary.html#!AJAX` which could be crawled as\n`https://example.com/dictionary.html?_escaped_fragment_=AJAX` which in turn would be\nshown to users and accessed as `https://example.com/dictionary.html#!AJAX`\n| We used to have a presentation embedded in this article, but it's lost now (the internet ate our homework?).\n\n\n[View the presentation](https://docs.google.com/present/view?id=dc75gmks_120cjkt2chf)\n\n\nWe're currently working on a proposal and a prototype implementation. Feedback is very\nwelcome---please add your comments below or in our\n[Webmaster Help Forum](https://support.google.com/webmasters/community/thread?tid=01242a2a9bafd648).\nThank you for your interest in making the AJAX-based web accessible and useful through search\nengines!\n\n\nProposal by Katharina Probst, Bruce Johnson, Arup Mukherjee, Erik van der Poel and Li Xiao, Google\n\nBlog post by\n[John Mueller](https://twitter.com/JohnMu),\nWebmaster Trends Analyst, Google Zürich"]]