Does Facebook crawler currently interpret javascript before parsing the DOM?

送分小仙女□ 提交于 2019-12-20 04:30:22

问题


Following link seems to tell that it can't: How does Facebook Sharer select Images and other metadata when sharing my URL?

But I wanted to know if it is still the case at current date... (The documentation on facebook dev site doesn't give any precision about this point)


回答1:


In the tests I've run I've never seen it interpret the JS, but that might be contextual / domain-specific (who knows).

To test your specific case, use the Facebook linter: https://developers.facebook.com/tools/debug

(log into FB first)

That's the only way to be sure 100% sure how FB will parse your page (what properties it will infer)




回答2:


Yes, that is still the case (and I wouldn’t expect it to change anytime soon).

The Open Graph meta information must be provided by the server, so that it can be read from the HTML code when the URL is fetched.



来源:https://stackoverflow.com/questions/25420887/does-facebook-crawler-currently-interpret-javascript-before-parsing-the-dom

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!