Reputation: 11211
When using third-party libraries such as jquery, yui-reset, swfobject and so on, do you link to the hosted versions, or download and host your own versions?
Pros and cons either way?
Upvotes: 0
Views: 164
Reputation: 23244
For production use hosted.
For development use local because if you're offline then your dev site is broke.
Upvotes: 1
Reputation: 5050
Hosted versions are apparently the way to go. For three main reasons (edit: I've added a fourth reason, but it's sort of a moot point):
Cons would be
I would say the pros generally outweigh the cons.
Upvotes: 5
Reputation: 24375
These are all javascript libraries - You want to put a copy of it on your own server. If you somehow use a different version then you would not have tested against the newer version and it might break your code.
Upvotes: 2
Reputation: 67194
I always download and host them locally, just because I'm worried about their server downtime, there's no real guarantee that their servers will be up for the rest of time. There is usually a note in the script about who it belongs to anyway.
I guess the only con would be if the person who made the script wouldn't actually want it downloaded.. But I don't see that ever happening.
Plus the requests times are much faster, instead of requesting a script hosted at google, just request it on your own server.
Upvotes: 1