为了让你的网站有一个Google Sitelinks搜索框,你必须在你的页面中包含这个脚本:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "https://www.example.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "https://query.example.com/search?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>我的问题是:<script type="application/ld+json">可以是外部的吗?这显然是无用的页面本身和爬虫可以提出额外的请求,如果他们想的话。
发布于 2015-08-20 05:07:22
虽然它不能是传统意义上的外部(使用src属性),但it can be injected by JavaScript。
https://stackoverflow.com/questions/32093892
复制相似问题