9

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?

Community
  • 1
  • 1
Guy
  • 65,082
  • 97
  • 254
  • 325

6 Answers6

15

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 Dec 31 '09 at 07:30
4

Guy & Juri-- in VS2010 this works to get jQuery Intellisense off the MS CDN:

<script>
/// <reference path="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5-vsdoc.js"/>
</script>

Just stick that into your <head/> in the .aspx page and it should work.

Marcus L
  • 463
  • 4
  • 7
3

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
  • 21,218
  • 14
  • 66
  • 75
2

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.

Community
  • 1
  • 1
bdukes
  • 152,002
  • 23
  • 148
  • 175
1

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
  • 904
  • 8
  • 8
  • 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 Dec 23 '09 at 16:35
  • will the jquery-1.3.2-vsdoc.js lookup correctly if you are only using jquery-1.3.2-min.js though? – Mike Jan 08 '10 at 14:03
  • 1
    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 Apr 30 '10 at 23:55
1

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
  • 5,568
  • 3
  • 46
  • 72
  • 1
    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 Mar 19 '10 at 19:38