tags:

views:

809

answers:

5

Following on from this question (that I asked) and this question (that Simon asked), is there a CDN that provides the jQuery script AND the -vsdoc version side-by-side?

e.g. Google provide:

http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js

but don't provide

http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min-vsdoc.js

Does Microsoft have a CDN for jQuery?

+2  A: 

No, I don't believe there is any significant CDN like that. However, see my answer to your other question about an easy workaround to reference the vsdoc file.

bdukes
+8  A: 

Yes, Microsoft has a CDN that hosts both jQuery and the vsdoc Intellisense for jQuery. You can learn more at http://www.asp.net/ajax/cdn/

Hi, could you just briefly explain what I need in order to get Intellisense support? I included the reference to the vsdoc file but get no intellisense? (VS2008). thx
Juri
+1  A: 

Note that on the Microsoft CDN, the jquery-1.3.2-vsdoc.js and jquery-1.3.2.min-vsdoc.js files are the same size. Avoid the min-vsdoc version - it's not minified at all, so the name is misleading.

Matt
Also note that the jQuery 1.3.2 min version from Google is 25% lighter (19.3 KB) than the one from Microsoft (25.72 KB).
Matt
will the jquery-1.3.2-vsdoc.js lookup correctly if you are only using jquery-1.3.2-min.js though?
Mike
If by lookup, you mean intellisense, then no. You'll get function names, but no details. The /// reference should point to the vsdoc version, while the version in the head or scriptmanager should point to the min version.In web application projects, I set the Build Action property of the vsdoc file to None, since there's no reason to publish it.In spite of Microsoft's fatter file, I'm now using their CDN. I had issues with corporate firewalls blocking unknown sites; they didn't know googleapis.com, but they knew microsoft.com, so ajax.microsoft.com was allowed.
Matt
+2  A: 

Update: jQuery now also hosts the code on a CDN and this includes the VSDOC versions. These links are available from the jQuery downloads page.

eg http://code.jquery.com/jquery-1.4.1-vsdoc.js

mike nelson
A: 

You do not need to link to the file in the traditional sense. Download the vsdoc file and put this at the top of your JS file (assumes vsdoc is in the same folder as your JS file):

/// <reference path="jquery-1.4.1-vsdoc.js" />
row1
That works but if you're working on several projects then you have several copies of the vsdoc file and it's only there for dev work, you never deploy it. So I was looking for a way to reference it off the net (and hopefully just cache it locally) so I didn't have to copy it into each project.
Guy