I was actually curious of this myself so I setup a jsbin test page using each of the following and then ran it through webpagetest. I tested:. Who was slowest: ajax. As stated by Pingdom :. This means that the most widely used CDN will have the odds on its side, which can pay off for your site. I think it depends on where is your targeted audience. You can use alertra. One additional consideration - if your site is SSL and you need to support Android 2.
My answer is bit different than others, I will go with microsoft if you need jquery validator which almost everyone need if you are using jquery.
Microsoft CDN http connection is Keep-Alive which is big plus when you are requesting multiple items. So if you need jquery validation then use Microsoft CDN, even if you need jquery ui use microsoft because google not not keeping keep-alive so every request are on it's own. In the summery it says that microsoft is not offering UI, that is not correct any more. Also consider when using Google CDN that some times people make typos such as ajax. This could potentially create a really nasty xss cross site scripting attack.
I have actually tested this out by registering a googlapis. This could be a real reason not to rely on CDN's because there are potentially dangerous attackers awaiting the typo requests and can easily serve back jquery etc with an xss payload. Depending which industry the application targets, you may not want to use a CDN managed by other organisations. It often raises issues regarding to compliance, privacy and confidentiality.
For example, when you include Google Analytics in a secure application, the browser still sends the current URL as the "referer" header. Any identifiers, say a session id or secret token may appear in their logs. For example, if a client IP of Other cases include information of consequence, such as an account number, social security number or session information in the URL.
That sort of data should never be in the URL as it can be used outside of the application. Akamai with which you can sign a BAA. I know from my experience, as Google's servers kept getting blocked by the Chinese government, rendering websites that uses them un-loadable. Full list of Microsoft CDN here. They have since renamed to ajax. As the Google Jquery hosting has been around a lot longer, the chances are much higher that people will already have it cached compared to the Microsoft one, so I would have it first.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more.
Asked 12 years, 1 month ago. Active 4 years, 11 months ago. Viewed 65k times. Improve this question. Xaisoft Xaisoft Add a comment.
Active Oldest Votes. Update based on comments: Short version: It doesn't matter much, but it may depend on what they host. Google's CDN we're using for: jquery. Changeset Since part of our build process is combining and minifying all custom javascript, we do this via a custom script manager that includes the release or debug non-minified versions of these scripts depending on the build. Improve this answer. Nick Craver Nick Craver k gold badges silver badges bronze badges. Less likely to be blocked?
I'd love to know how you came up with that idea. The MS network isn't MS's anyway, it's akamai's who have been doing load balanced servers for a lot longer than google has, which makes a nonsense of the "better fall-over system" as well. Really, if you're going to make claims like this some evidence would be nice. How to multiple version of jQuery? How to Use the jQuery load Method Difference between document.
Is jQuery is a replacement of JavaScript? JQuery or JavaScript which is quicker in execution? What is the use of param method? How to work with jQuery parent , children and siblings? Difference between parent and parents in jQuery? What does jQuery data function do? How do you check if an element exists or not in jQuery? How to run an event handler only once in jQuery? What happen if you return false from a jQuery event handler?
What is each function in jQuery? How do you use it? Which one is more efficient, document. What is event. PreventDefault in jQuery? Odds are better that the site visitor will have a cached copy of the file since other sites will also be linking to the same file. It saves the site owner some bandwidth since the file is externally hosted.
This survey will hopefully answer that question for you. Google vs. Microsoft vs. Which CDN is the fastest? Other observations and notes We thought it would be interesting to share a few other observations we made while doing this survey. Gzipping JS files makes a big difference, even if they are minified.
The latest jQuery file is 93 kB if only minified, but that shrinks to a mere 42 kB when gzipped. One thing that may have some effect on first-time site visitors is if the site visitor already has a cached version of jQuery.
The more widely used a CDN is, the better the odds for this. Visitor location matters, even for CDNs. Summary and conclusion So, to reiterate, all three CDNs in this survey are pretty much equal in terms of reliability excellent uptime.
Vote for your favorite 24hbc project. The best Pingdom blog posts of From the viral Double [ Announcing the Pingdom API 3. They help us improve and extend what others h [
0コメント