In my ASP.NET MVC application, I reference three scripts from my local /Scripts directory.
<script src="/Scripts/jquery-1.7.2.min.js"></script>
<script src="/Scripts/jquery.validate.min.js"></script>
<script src="/Scripts/jquery.validate.unobtrusive.min.js"></script>
I would now use a CDN to load them.
Is it preferable to mix two CDN and use Google for jQuery and Microsoft for jQuery Validate? This way, both could be done in parallel?
Or is it useless and it’s easier to depend on a single CDN?
It’s true that the scripts could be loaded in parallel, but on the other hand it causes another domain lookup, which could actually take longer than loading the two scripts from the same domain.
You are also adding another single point of failure. Both CDNs have to work for your page to work properly. Even if the risk is low for a failure there, it’s still a risk.