Tyssen
Tyssen

Reputation: 1711

Twitter button and Google Page Speed

On a page that has Twitter's Tweet buttons, I get warnings from Google Page Speed:

The following resources have identical contents, but are served from different URLs. Serve these resources from a consistent URL to save 3 request(s) and 52.0KiB. http://platform0.twitter.com/widgets/tweet_button.html http://platform1.twitter.com/widgets/tweet_button.html http://platform2.twitter.com/widgets/tweet_button.html

The following resources have identical contents, but are served from different URLs. Serve these resources from a consistent URL to save 2 request(s) and 4.6KiB. http://platform0.twitter.com/widgets/images/tweet.png http://platform1.twitter.com/widgets/images/tweet.png http://platform2.twitter.com/widgets/images/tweet.png

Why does Twitter's widgets.js serve up different URLs for each of these and is there any way around it?

Upvotes: 1

Views: 634

Answers (2)

Guillaume Carre
Guillaume Carre

Reputation: 140

Here is the answer on the twitter for websites forum, by a Twitter engineer: https://dev.twitter.com/discussions/8671

Upvotes: 1

Michael Aaron Safyan
Michael Aaron Safyan

Reputation: 95569

It probably serves them from different URLs to load-balance the requests; however, as page speed correctly points out, this is actually a bad idea to do within the context of a single request (though it makes sense to rotate the domains for distinct requests), since it results in a cache miss of the resource.

Upvotes: 1

Related Questions