Click here to Skip to main content
15,891,920 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am developing asp.net dynamic website and i am using some javascript libraries and css.
I want to know which is good practice...add direct online path of the javascript library or add the path from local project folder.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<link type="text/css" rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
OR
<script src="Script/ajaxgoogleapis-1.8.3.js" type="text/javascript"></script>
<link href="Css/smoothness.css" rel="stylesheet" type="text/css" />
What are the cons and pros of both?
Which way performance and speed is good?
Posted
Updated 6-Jun-14 9:33am
v3

Hi,

I hope you are going to deploy the website in Internet.

Quote:
What are the cons and pros of both?


Use CDN path,because CDN are works great with internet. CDN will decide and locate the nearest server for the user. So loading time is lesser compare to the local path.


Quote:
Which way performance and speed is good?


No doubt. CDN is always good in performance.

Hope this helps!
Thanks!

S Francis
My ASPDotNet Blog
 
Share this answer
 
Have a look at the second paragraph, Setting the scene, of my article D3.js crash course - Part2[^] - loading jQuery this way ensures that you load it only once, and that you are in control of the version that gets loaded.

For a web application that is supposed to run on the intranet I would install jQuery as a part of the web application, for an internett application I would use a CDN like "ajax.googleapis.com"

Best regards
Espen Harlinn
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900