3 important ASP.NET jquery CDN Interview questions with answers
What is CDN (Content delivery network)?
What is CDN (Content delivery network)?In CDN multiple copies of the website is copied on different geographical servers. When users request website content which have CDN enabled depending on their geographical location content is served from the nearest geographical location server of the user.
So if a user is from India, the Indian CDN server will serve request for Indian users. This leads to faster delivery and good backup in case there are issues.
If you want to reference google CDN Jquery files you can use the below script.
Many times it's possible that Microsoft and google servers can go down for some time. So in those situations you would like your page to reference jquery files from local server.
So to implement a CDN fallback is a two-step process :-
First reference the CDN jquery. In the below code you can see we have reference Microsoft CDN jquery file.
Now if Microsoft CDN is down then the Jquery value will be "undefined". So you can see in the below code we are checking if the Jquery is having "undefined" value then do a document write and reference your local Jquery files.
Below is the full code for the same.
All the above three ASP.NET JqueryInterview questions with answers are provided by questpond.com
The above questions are taken from the famous .NET Interview question book published by Bpbpublications , you can know more about the book from http://www.flipkart.com/net-interview-questions-6th/p/itmdyuqzdqx8cvqx