问题原文
原帖链接 · malejpavouk · CC BY-SA 3.0
I have a page written in React.js, the whole content (including meta tags) is rendered using javascript. Google indexing works flawlessly for these pages, but Bing is inconsistent.
Title
- some used fallback title from HTML (Decrane.io)
- some generated from javascript (MD5 | Decrane.io) - this is the correct and expected case
- when I removed the fallback (to hint bing not to use it), the page does not have title at all...Also notice that this page does not have any content (so it seems that bing did not try to hydrate the page using javascript)
So the question: is there any way, how to force/hint Bing to index the JS pages correctly?
Yes, I know I could use isomorphic templating, but this is just my small personal side project, so I do noot want to invest into isomorph. Also as google supports hydrating the page through JS and it seems that Bing to some extent as well, I think it might be just a matter of time, till all engines fully support JS.
Image of inconsistency in Bing (http/https difference is ok, I made a protocol switch recently)
已采纳解答
原帖链接 · Hayk Saakian · CC BY-SA 4.0
No. You can't really encourage Bing to index JS properly.
It seems like unless you use the isomorphic / universal style of coding javascript apps then you're just out of luck.
It's a roll of the dice to see if they index the site correctly.
https://www.screamingfrog.co.uk/bing-javascript/
Another work-around is to use a 3rd party service to pre-render your pages. There's a small industry of service providers like https://prerender.io/ who only exist because Google and Bing can't crawl javascript very well.
If you have a small project, it seems like Prerender.io is free for up to 250 pages. I'm assuming you would qualify.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
