问题
When Twitter scrapes URLs to render Twitter cards (configured via meta tags), will Twitter first execute your JavaScript or do they require that these tags are sent directly from the server?
Reason I ask is it's 2016 so I'm developing a single page application. No matter what URL you request, I'll return /index.html which fetches my JS and dynamically loads whichever page you requested (including meta tags) on the client.
I know Google will run your JS, but does Twitter?
回答1:
After using Twitter's Card Validator (https://cards-dev.twitter.com/validator), it looks like the answer is sadly no because I just tested this out in production and they don't seem to detect the meta tags I add dynamically.
来源:https://stackoverflow.com/questions/35882222/does-twitters-url-crawler-execute-javascript