This will probably get a pretty nasty response, but my server isn't the fastest at the moment, and my site loads much faster if I hotlink from the jQuery homepage so they server the content. Is this bad to do? Does jQuery eventually remove those js files from their page?
相关问题
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Include empty value fields in jQuery .serialize()
- Disable Browser onUnload on certain links?
- how to get selected text from iframe with javascri
if it is bad I haven't heard about it. However you can use a CDN for better performance probably. Google and Microsoft also serve jQuery through their CDN for free.
cdnjs: https://cdnjs.com/libraries/jquery/
Google's CDN: http://code.google.com/apis/libraries/devguide.html#Libraries
jQuery's CDN: http://docs.jquery.com/Downloading_jQuery#CDN_Hosted_jQuery
MS's CDN: http://www.asp.net/ajaxlibrary/cdn.ashx#Third-Party_Files_on_the_CDN_14
Are you using their official CDNs? A lot of people do.
I'm not sure why everyone is so quick to say Google. The above link says very specifically that you can hotlink to the jQuery CDN:
Better hotlink it from Google API libraries.
Very big advantages:
If the library is not intended for loading from the URL, I would avoid it.
However, Google provides hosted versions:
http://code.google.com/apis/libraries/
You can use Google Libraries and link it from there : )
You should use Google's hosted versions:
http://code.google.com/apis/libraries/devguide.html