Facebook Share不接收在页面加载后更改的标题/描述元标记 [英] Facebook Share doesn't pick up title / description meta tags that are changed after page load

查看:131
本文介绍了Facebook Share不接收在页面加载后更改的标题/描述元标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

显然,Facebook Share不会在页面加载之后选择更改(通过JavaScript)的标题/描述元标记。它基本上使用加载后可用的元标记。

Apparently Facebook Share doesn't pick up the title / description meta tags that are changed (via JavaScript) after the page load. It basically use the meta tags that are available upon load.

这是一个简单的例子


  • 链接将更改标题/描述元标记单击。您可以确认使用Firebug。

  • 点击f | Share按钮:Facebook仍然显示页面加载时可用的标题。

有人知道如何解决这个问题?

Anybody knows how to fix this?

推荐答案

这是Facebook的引用。当有人分享该页面,并且每24小时开始(而不是如您所建议的页面加载),他们会刮擦页面的元标记。如果您更改元标记,您需要使用 URL Linter

This is a quote from Facebook. They scrape the page's meta tags when someone shares that page, and every 24 hours onwards (and not on page-load as you suggested). If you change the meta tags, you need to get FB to "lint" your page again using the URL Linter.


Facebook是否在刮我的网页?

Facebook需要抓住你的网页才能知道如何在网站上显示它。
Facebook每24小时刮擦您的页面,以确保属性是最新的。当Open Graph页面的管理员点击Like按钮,以及当URL被输入到Facebook URL Linter中时,页面也被刮除。 Facebook观察您的网址上的缓存标头,它将按照优先级顺序查看过期和缓存控制。但是,即使您指定了更长的时间,Facebook也会每24小时刮擦您的页面。

Facebook needs to scrape your page to know how to display it around the site. Facebook scrapes your page every 24 hours to ensure the properties are up to date. The page is also scraped when an admin for the Open Graph page clicks the Like button and when the URL is entered into the Facebook URL Linter. Facebook observes cache headers on your URLs - it will look at "Expires" and "Cache-Control" in order of preference. However, even if you specify a longer time, Facebook will scrape your page every 24 hours.

来源

这篇关于Facebook Share不接收在页面加载后更改的标题/描述元标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆