问题描述
是否可以使Google蜘蛛读取JSON数据?
Is it possible to make JSON data readable by a Google spider?
例如,我有一个JSON提要,其中包含电子商务网站的数据.此JSON数据用于在用户浏览器中填充人类可读的页面. (即,从JSON数据到显示页面的转换是在用户浏览器中完成的;不是我的选择,而是我所要使用的东西,它是旧的CGI应用程序,而不是实际的服务器端脚本语言.)
Say for instance that I have a JSON feed that contains the data for an e-commerce site. This JSON data is used to populate a human-readable page in the users browser. (I.E. The translation from JSON data to human displayed page is done inside the users browser; not my choice, just what I've been given to work with, its an old legacy CGI application and not an actual server-side scripting language.)
我在这里担心的是,当用户在google中点击它时,Google蜘蛛将无法拾取/直接链接到有问题的项目,因为该页面会显示一个包含所有项目的索引页面,而不是直接链接到他们单击的项目.
My concern here is that, the google spiders will not be able to pickup/directly link to the item in question when a user clicks on it in google, being presented with an index page full of all the items, rather than being linked directly to the item they clicked on.
无论如何,是否可以通知" JSON中的Google蜘蛛他们应该向用户提供其他链接的内容?
Is there anyway of "informing" the google spider in the JSON that what they should feed the user a different link?
推荐答案
您应该在服务器端代码中围绕JSON数据创建一个包装器页面,并根据用户身份使用包装器或常规版本来响应请求,代理人.
You should make a wrapper page in server-side code around the JSON data, and respond to requests with either the wrapper or the regular version depending on the User-Agent.
这篇关于无论如何,谷歌蜘蛛可以读取json数据吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!