如何使 Flex RIA 内容可供 Google 等搜索引擎访问?
您如何使 Flex RIA 应用程序的内容可供 Google 访问,以便 Google 可以对内容建立索引并显示指向 Flex RIA 中正确项目的链接。 考虑一个在 Flex 中创建的在线商店,其中提供的商品应由 Google 编制索引。 然后 Google 上的链接应该会打开 RIA 中的相应产品。
How would you make the contents of Flex RIA applications accessible to Google, so that Google can index the content and shows links to the right items in your Flex RIA. Consider a online shop, created in Flex, where the offered items shall be indexed by Google. Then a link on Google should open the corresponding product in the RIA.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这里有一个大量的线程:
http://tech.groups.yahoo。 com/group/flexcoders/message/58926
但本质上,Google 已经对 .SWF 文件建立了索引(您可以通过将搜索结果限制为仅 .SWF 文件来自行测试)。 它可以搜索 SWF 文件中的任何文本内容。
但是,如果您网站中的文本信息来自数据库/网络服务器。 那么它将无法轻松访问此信息。
实现此功能的一个示例是使用 XML 文件作为索引页,然后使用 XSLT 转换通过 Flex 呈现它。 “Ted On Flex”对此有很好的信息。
http://flex.org/consultants
There is a massive thread available here:
http://tech.groups.yahoo.com/group/flexcoders/message/58926
But essentially, google already indexes .SWF files (you can test this out yourself by restricting search results to just .SWF files). It can search any text content within the SWF file.
However, if the text information in your site comes from a database / web server. Then it won't be able to access this information easily.
One example of getting this to work is using an XML file as your index page, then using an XSLT transform to render it using Flex. "Ted On Flex" has good information about this.
http://flex.org/consultants
目前,使 RIA 可被搜索引擎索引的最佳技术称为渐进增强(或优雅降级) ,取决于您看到的方式)。 基本上,您可以使用与应用程序加载相同的数据来创建应用程序的简单 HTML 版本。 该版本应该由某种后端服务器技术动态生成。 此 HTML 版本可以被 Google 索引,但每个页面还包含一个检查,确定访问者是否能够查看丰富版本,如果可以,则用 Flash、Flex 或 Silverlight 应用程序替换 HTML 内容,最好以这样的方式应用程序启动时显示的数据与当前页面相同。 “替换”可能意味着它只是将应用程序嵌入到 HTML 内容之上,或者将用户重定向到嵌入它的页面。 前一种解决方案更可取,因为后者可以被视为伪装。
保持商店的 HTML 和 RIA 版本同步的一种方法是确定 URL 方案并确保 RIA 使用某种深度链接技术。 如果访问者通过搜索引擎到达特定项目,例如
/items/345
,RIA 中相应的伪 URL 应该相同,以便您可以将 RIA 嵌入到页面顶部并将该 URL 设置为参数,以使 RIA 在加载后立即显示同一页面。今年夏天,谷歌和雅虎! 宣布他们将开始使用 Flash Player 的自定义版本来索引基于 Flash 的应用程序,“以与人相同的方式”探索它们。 现在,两个月后,仍然没有证据表明这确实发生了。 Ryan Stweart 不得不取消他的 Flex SEO 竞赛,因为很明显没有人能获胜。 问题似乎是,虽然该技术可能非常有效(尽管我对此持怀疑态度),但自定义 Flash Player 需要某种网络接口才能加载任何引用的资源,例如 XML 数据、其他 SWF 等。和目前尚未实现由 Google 提供。 这意味着,对于动态加载所有数据的应用程序(例如我能想到的所有数据),Googlebot 实际上不会看到任何相关内容。 雅虎! 完全忽略基于 SWF 的内容。
哦,碰巧我在 Flex 节目的最新一集 =)
Currently the best technique for making an RIA indexable by search engines is called progressive enhancement (or graceful degradation, depending on which way you see it). Basically you create a simple HTML version of the application using the same data as the application loads. This version should be dynamically generated by some kind of backend server technology. This HTML version can be indexed by Google, but each page also contains a check that determines if the visitor is capable of viewing the rich version, and if so replaces the HTML content with the Flash, Flex or Silverlight application, preferably in such a way that the application starts in a state where it shows the same data as the current page. "Replaces" can mean that it just embeds the application on top of the HTML content, or that it redirects the user to a page that embeds it. The former solution is preferable, because the latter can be considered cloaking.
One way of keeping the HTML and RIA versions of a shop synchronized is to decide on a URL scheme and make sure that RIA uses some kind of deep linking technique. If a visitor arrives to a specific item via a search engine, say
/items/345
the corresponding pseudo-URL in the RIA should be the same, so that you can embed the RIA on top of the page and set that URL as a parameter to make the RIA display that same page as soon as it has loaded.This summer, Google and Yahoo! announced that they would begin using a custom version of Flash Player to index Flash based applications by exploring them "in the same way that a person would". Now, two months later there is still no evidence that this is actually happening. Ryan Stweart had to cancel his Flex SEO competition because it became evident that no one could win. The problem seems to be that event though the technique may very well work (although I'm sceptical), the custom Flash Player needs some kind of network interface to be able to load any referenced resources, like XML data, other SWFs, etc., and this is currently not implemented by Google. This means that for an application that loads all it's data dynamically, like say, all that I can think of, Googlebot will not actually see anything relevant. Yahoo! ignores SWF based content altogether.
Oh, and it just so happens that I talk about Flex and SEO on the latest episode of the Flex show =)