Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Twitter's URL crawler execute JavaScript?

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?

like image 730
Andrew Rasmussen Avatar asked Mar 09 '16 03:03

Andrew Rasmussen


1 Answers

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.

like image 143
Andrew Rasmussen Avatar answered Oct 29 '22 00:10

Andrew Rasmussen