首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >谷歌sRich代码片段。从https://schema.org重定向到http://schema.org

谷歌sRich代码片段。从https://schema.org重定向到http://schema.org
EN

Stack Overflow用户
提问于 2021-02-19 22:25:04
回答 1查看 19关注 0票数 0

我尝试将数据添加到我的应用程序中。我添加了这个代码结构

代码语言:javascript
复制
return {
    '@context': 'https://schema.org',
    '@type': 'Product',
    'sku': this.currentProduct.sku,
    'category': this.productCategory,
    'name': this.productName,
    'description': this.productDescription,
    'offers': {
      '@type': 'Offer',
      'price': this.bestPrice,
      'priceCurrency': 'USD',
      'availability': this.currentProduct.stock?.is_in_stock ? 'https://schema.org/InStock' : 'https://schema.org/OutOfStock'
    },
    'image': this.thumbnail
  }

但是,如果我在search.google.com/test/rich-results上查看结果,我会看到availability字段被分配了https值(而不是https://schema.org/InStock )。为什么会发生这种情况?这对项目很重要吗?

EN

回答 1

Stack Overflow用户

发布于 2021-02-20 06:38:37

这不是问题。Schema.org正在过渡到使用https,但在很长一段时间里,它都是http,并且http将在未来很长一段时间内使用。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66279378

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档